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
+1 -2
View File
@@ -23,7 +23,6 @@
#include <errno.h>
#include <pthread.h>
#include <hydra.h>
#include <processing/jobs/callback_job.h>
#define HA_FIFO IPSEC_PIDDIR "/charon.ha"
@@ -135,7 +134,7 @@ ha_ctl_t *ha_ctl_create(ha_segments_t *segments, ha_cache_t *cache)
this->job = callback_job_create((callback_job_cb_t)dispatch_fifo,
this, NULL, NULL);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
+1 -2
View File
@@ -15,7 +15,6 @@
#include "ha_dispatcher.h"
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@@ -870,7 +869,7 @@ ha_dispatcher_t *ha_dispatcher_create(ha_socket_t *socket,
);
this->job = callback_job_create((callback_job_cb_t)dispatch,
this, NULL, NULL);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
lib->processor->queue_job(lib->processor, (job_t*)this->job);
return &this->public;
}
+2 -3
View File
@@ -17,7 +17,6 @@
#include <pthread.h>
#include <hydra.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
#include <utils/linked_list.h>
@@ -284,7 +283,7 @@ static void start_watchdog(private_ha_segments_t *this)
{
this->job = callback_job_create((callback_job_cb_t)watchdog,
this, NULL, NULL);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
lib->processor->queue_job(lib->processor, (job_t*)this->job);
}
METHOD(ha_segments_t, handle_status, void,
@@ -346,7 +345,7 @@ static job_requeue_t send_status(private_ha_segments_t *this)
message->destroy(message);
/* schedule next invocation */
hydra->scheduler->schedule_job_ms(hydra->scheduler, (job_t*)
lib->scheduler->schedule_job_ms(lib->scheduler, (job_t*)
callback_job_create((callback_job_cb_t)
send_status, this, NULL, NULL),
this->heartbeat_delay);
+1 -2
View File
@@ -22,7 +22,6 @@
#include <unistd.h>
#include <pthread.h>
#include <hydra.h>
#include <daemon.h>
#include <utils/host.h>
#include <processing/jobs/callback_job.h>
@@ -108,7 +107,7 @@ METHOD(ha_socket_t, push, void,
job = callback_job_create((callback_job_cb_t)send_message,
data, (void*)job_data_destroy, NULL);
hydra->processor->queue_job(hydra->processor, (job_t*)job);
lib->processor->queue_job(lib->processor, (job_t*)job);
return;
}
DBG1(DBG_CFG, "pushing HA message failed: %s", strerror(errno));