Refer to scheduler and processor via lib and not hydra.

This commit is contained in:
Tobias Brunner
2010-09-02 19:04:18 +02:00
parent e18556e9e9
commit bb381e26c6
37 changed files with 79 additions and 103 deletions
+2 -3
View File
@@ -17,7 +17,6 @@
#include "child_create.h"
#include <hydra.h>
#include <daemon.h>
#include <crypto/diffie_hellman.h>
#include <credentials/certificates/x509.h>
@@ -262,7 +261,7 @@ static void schedule_inactivity_timeout(private_child_create_t *this)
{
close_ike = lib->settings->get_bool(lib->settings,
"charon.inactivity_close_ike", FALSE);
hydra->scheduler->schedule_job(hydra->scheduler, (job_t*)
lib->scheduler->schedule_job(lib->scheduler, (job_t*)
inactivity_job_create(this->child_sa->get_reqid(this->child_sa),
timeout, close_ike), timeout);
}
@@ -872,7 +871,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");
hydra->scheduler->schedule_job_ms(hydra->scheduler, (job_t*)
lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)
delete_ike_sa_job_create(this->ike_sa->get_id(this->ike_sa), TRUE),
100);
}
+2 -3
View File
@@ -16,7 +16,6 @@
#include "child_rekey.h"
#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/child_create.h>
@@ -300,7 +299,7 @@ static status_t process_i(private_child_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "peer seems to not support CHILD_SA rekeying, "
"starting reauthentication");
this->child_sa->set_state(this->child_sa, CHILD_INSTALLED);
hydra->processor->queue_job(hydra->processor,
lib->processor->queue_job(lib->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;
@@ -330,7 +329,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);
hydra->scheduler->schedule_job(hydra->scheduler, job, retry);
lib->scheduler->schedule_job(lib->scheduler, job, retry);
}
return SUCCESS;
}
+1 -1
View File
@@ -693,7 +693,7 @@ static status_t build_r_ms(private_ike_me_t *this, message_t *message)
job_t *job = (job_t*)mediation_job_create(this->peer_id,
this->ike_sa->get_other_id(this->ike_sa), this->connect_id,
this->connect_key, this->remote_endpoints, this->response);
hydra->processor->queue_job(hydra->processor, job);
lib->processor->queue_job(lib->processor, job);
break;
}
default:
+3 -4
View File
@@ -16,7 +16,6 @@
#include "ike_rekey.h"
#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/ike_init.h>
@@ -197,7 +196,7 @@ static status_t process_i(private_ike_rekey_t *this, message_t *message)
DBG1(DBG_IKE, "peer seems to not support IKE rekeying, "
"starting reauthentication");
this->ike_sa->set_state(this->ike_sa, IKE_ESTABLISHED);
hydra->processor->queue_job(hydra->processor,
lib->processor->queue_job(lib->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;
@@ -218,7 +217,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);
hydra->scheduler->schedule_job(hydra->scheduler, job, retry);
lib->scheduler->schedule_job(lib->scheduler, job, retry);
}
return SUCCESS;
case NEED_MORE:
@@ -261,7 +260,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);
hydra->scheduler->schedule_job(hydra->scheduler, job, 10);
lib->scheduler->schedule_job(lib->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;