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:
@@ -772,7 +772,7 @@ static void handle_child_sa_failure(private_child_create_t *this,
|
||||
/* we delay the delete for 100ms, as the IKE_AUTH response must arrive
|
||||
* first */
|
||||
DBG1(DBG_IKE, "closing IKE_SA due CHILD_SA setup failure");
|
||||
charon->scheduler->schedule_job(charon->scheduler, (job_t*)
|
||||
charon->scheduler->schedule_job_ms(charon->scheduler, (job_t*)
|
||||
delete_ike_sa_job_create(this->ike_sa->get_id(this->ike_sa), TRUE),
|
||||
100);
|
||||
}
|
||||
|
||||
@@ -269,7 +269,7 @@ static status_t process_i(private_child_rekey_t *this, message_t *message)
|
||||
DBG1(DBG_IKE, "CHILD_SA rekeying failed, "
|
||||
"trying again in %d seconds", retry);
|
||||
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, retry * 1000);
|
||||
charon->scheduler->schedule_job(charon->scheduler, job, retry);
|
||||
}
|
||||
return SUCCESS;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user