schedule_job uses seconds to support time values larger than 49 days

added schedule_job_ms for ms resolution events
This commit is contained in:
Martin Willi
2009-04-21 15:16:56 +00:00
parent 59a4e87db6
commit 6554b5e412
11 changed files with 125 additions and 74 deletions
+2 -2
View File
@@ -234,7 +234,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "IKE_SA rekeying failed, "
"trying again in %d seconds", retry);
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
charon->scheduler->schedule_job(charon->scheduler, job, retry * 1000);
charon->scheduler->schedule_job(charon->scheduler, job, retry);
}
return SUCCESS;
case NEED_MORE:
@@ -273,7 +273,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
/* peer should delete this SA. Add a timeout just in case. */
job_t *job = (job_t*)delete_ike_sa_job_create(
other->new_sa->get_id(other->new_sa), TRUE);
charon->scheduler->schedule_job(charon->scheduler, job, 10000);
charon->scheduler->schedule_job(charon->scheduler, job, 10);
DBG1(DBG_IKE, "IKE_SA rekey collision won, deleting rekeyed IKE_SA");
charon->ike_sa_manager->checkin(charon->ike_sa_manager, other->new_sa);
other->new_sa = NULL;