Refer to processor via hydra and not charon.

This commit is contained in:
Tobias Brunner 2010-07-05 13:52:05 +02:00
parent 633fbe4fde
commit c5f7146b17
34 changed files with 101 additions and 71 deletions

View File

@ -17,7 +17,7 @@
#include <stdint.h>
#include <daemon.h>
#include <hydra.h>
#include <threading/thread.h>
#include <threading/thread_value.h>
#include <threading/condvar.h>
@ -163,7 +163,7 @@ METHOD(bus_t, listen_, void,
this->mutex->lock(this->mutex);
this->listeners->insert_last(this->listeners, data.entry);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
thread_cleanup_push((thread_cleanup_t)this->mutex->unlock, this->mutex);
thread_cleanup_push((thread_cleanup_t)listener_cleanup, &data);
old = thread_cancelability(TRUE);

View File

@ -32,6 +32,7 @@
#include "daemon.h"
#include <library.h>
#include <hydra.h>
#include <config/proposal.h>
#ifndef LOG_AUTHPRIV /* not defined on OpenSolaris */

View File

@ -20,6 +20,7 @@
#include "receiver.h"
#include <hydra.h>
#include <daemon.h>
#include <network/socket.h>
#include <network/packet.h>
@ -360,7 +361,7 @@ static job_requeue_t receive_packets(private_receiver_t *this)
}
}
}
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)process_message_job_create(message));
return JOB_REQUEUE_DIRECT;
}
@ -426,7 +427,7 @@ receiver_t *receiver_create()
this->job = callback_job_create((callback_job_cb_t)receive_packets,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -19,6 +19,7 @@
#include "sender.h"
#include <hydra.h>
#include <daemon.h>
#include <network/socket.h>
#include <processing/jobs/callback_job.h>
@ -195,7 +196,7 @@ sender_t * sender_create()
"charon.send_delay_response", TRUE),
);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -20,6 +20,7 @@
#include "android_service.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@ -378,7 +379,7 @@ android_service_t *android_service_create(android_creds_t *creds)
charon->bus->add_listener(charon->bus, &this->public.listener);
this->job = callback_job_create((callback_job_cb_t)initiate, this,
NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -31,6 +31,7 @@
#include <threading/condvar.h>
#include <threading/thread.h>
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@ -751,7 +752,7 @@ dhcp_socket_t *dhcp_socket_create()
this->job = callback_job_create((callback_job_cb_t)receive_dhcp,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -23,6 +23,7 @@
#include <linux/filter.h>
#include <sys/ioctl.h>
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@ -191,7 +192,7 @@ farp_spoofer_t *farp_spoofer_create(farp_listener_t *listener)
this->job = callback_job_create((callback_job_cb_t)receive_arp,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -23,6 +23,7 @@
#include <errno.h>
#include <pthread.h>
#include <hydra.h>
#include <processing/jobs/callback_job.h>
#define HA_FIFO IPSEC_PIDDIR "/charon.ha"
@ -134,7 +135,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);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -15,6 +15,7 @@
#include "ha_dispatcher.h"
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@ -869,7 +870,7 @@ ha_dispatcher_t *ha_dispatcher_create(ha_socket_t *socket,
);
this->job = callback_job_create((callback_job_cb_t)dispatch,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -17,6 +17,7 @@
#include <pthread.h>
#include <hydra.h>
#include <threading/mutex.h>
#include <threading/condvar.h>
#include <utils/linked_list.h>
@ -283,7 +284,7 @@ static void start_watchdog(private_ha_segments_t *this)
{
this->job = callback_job_create((callback_job_cb_t)watchdog,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
}
METHOD(ha_segments_t, handle_status, void,

View File

@ -22,6 +22,7 @@
#include <unistd.h>
#include <pthread.h>
#include <hydra.h>
#include <daemon.h>
#include <utils/host.h>
#include <processing/jobs/callback_job.h>
@ -107,7 +108,7 @@ METHOD(ha_socket_t, push, void,
job = callback_job_create((callback_job_cb_t)send_message,
data, (void*)job_data_destroy, NULL);
charon->processor->queue_job(charon->processor, (job_t*)job);
hydra->processor->queue_job(hydra->processor, (job_t*)job);
return;
}
DBG1(DBG_CFG, "pushing HA message failed: %s", strerror(errno));

View File

@ -28,6 +28,7 @@
#include "kernel_klips_ipsec.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <threading/mutex.h>
@ -1300,7 +1301,7 @@ static void process_acquire(private_kernel_klips_ipsec_t *this, struct sadb_msg*
DBG2(DBG_KNL, "received an SADB_ACQUIRE");
DBG1(DBG_KNL, "creating acquire job for CHILD_SA with reqid {%d}", reqid);
job = (job_t*)acquire_job_create(reqid, NULL, NULL);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
/**
@ -1363,7 +1364,7 @@ static void process_mapping(private_kernel_klips_ipsec_t *this, struct sadb_msg*
DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and"
" reqid {%d} changed, queuing update job", ntohl(spi), reqid);
job = (job_t*)update_sa_job_create(reqid, new_src);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
}
}
@ -1510,7 +1511,7 @@ static job_requeue_t sa_expires(sa_expire_t *expire)
{
job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
}
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
return JOB_REQUEUE_NONE;
}
@ -2655,7 +2656,7 @@ kernel_klips_ipsec_t *kernel_klips_ipsec_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -35,6 +35,7 @@
#include "kernel_netlink_ipsec.h"
#include "kernel_netlink_shared.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <threading/mutex.h>
@ -296,7 +297,7 @@ struct policy_entry_t {
static u_int policy_hash(policy_entry_t *key)
{
chunk_t chunk = chunk_create((void*)&key->sel,
sizeof(struct xfrm_selector) + sizeof(u_int32_t));
sizeof(struct xfrm_selector) + sizeof(u_int32_t));
return chunk_hash(chunk);
}
@ -593,7 +594,7 @@ static void process_acquire(private_kernel_netlink_ipsec_t *this, struct nlmsghd
DBG1(DBG_KNL, "creating acquire job for policy %R === %R with reqid {%u}",
src_ts, dst_ts, reqid);
job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
/**
@ -631,7 +632,7 @@ static void process_expire(private_kernel_netlink_ipsec_t *this, struct nlmsghdr
{
job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
}
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
/**
@ -703,7 +704,7 @@ static void process_migrate(private_kernel_netlink_ipsec_t *this, struct nlmsghd
src_ts, dst_ts, policy_dir_names, dir, reqid, local);
job = (job_t*)migrate_job_create(reqid, src_ts, dst_ts, dir,
local, remote);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
else
{
@ -740,7 +741,7 @@ static void process_mapping(private_kernel_netlink_ipsec_t *this,
DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and "
"reqid {%u} changed, queuing update job", ntohl(spi), reqid);
job = (job_t*)update_sa_job_create(reqid, host);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
}
}
@ -1705,7 +1706,7 @@ METHOD(kernel_ipsec_t, add_policy, status_t,
DBG2(DBG_KNL, "policy %R === %R %N (mark %u/0x%8x) "
"already exists, increasing refcount",
src_ts, dst_ts, policy_dir_names, direction,
mark.value, mark.mask);
mark.value, mark.mask);
}
else
{
@ -2260,7 +2261,7 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
}
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -47,6 +47,7 @@
#include "kernel_netlink_net.h"
#include "kernel_netlink_shared.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <threading/condvar.h>
@ -1479,7 +1480,7 @@ kernel_netlink_net_t *kernel_netlink_net_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
if (init_address_list(this) != SUCCESS)
{

View File

@ -54,6 +54,7 @@
#include "kernel_pfkey_ipsec.h"
#include <hydra.h>
#include <daemon.h>
#include <utils/host.h>
#include <threading/thread.h>
@ -940,7 +941,7 @@ static void process_acquire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
DBG1(DBG_KNL, "creating acquire job for policy %R === %R with reqid {%u}",
src_ts, dst_ts, reqid);
job = (job_t*)acquire_job_create(reqid, src_ts, dst_ts);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
/**
@ -985,7 +986,7 @@ static void process_expire(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
{
job = (job_t*)rekey_child_sa_job_create(reqid, protocol, spi);
}
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
#ifdef SADB_X_MIGRATE
@ -1035,7 +1036,7 @@ static void process_migrate(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
src_ts, dst_ts, policy_dir_names, dir, reqid, local);
job = (job_t*)migrate_job_create(reqid, src_ts, dst_ts, dir,
local, remote);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
else
{
@ -1099,7 +1100,7 @@ static void process_mapping(private_kernel_pfkey_ipsec_t *this, struct sadb_msg*
DBG1(DBG_KNL, "NAT mappings of ESP CHILD_SA with SPI %.8x and "
"reqid {%u} changed, queuing update job", ntohl(spi), reqid);
job = (job_t*)update_sa_job_create(reqid, host);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
}
}
@ -2205,7 +2206,7 @@ kernel_pfkey_ipsec_t *kernel_pfkey_ipsec_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -23,6 +23,7 @@
#include "kernel_pfroute_net.h"
#include <hydra.h>
#include <daemon.h>
#include <utils/host.h>
#include <threading/thread.h>
@ -716,7 +717,7 @@ kernel_pfroute_net_t *kernel_pfroute_net_create()
this->job = callback_job_create((callback_job_cb_t)receive_events,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
if (init_address_list(this) != SUCCESS)
{

View File

@ -17,6 +17,7 @@
#include <signal.h>
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/delete_ike_sa_job.h>
@ -59,7 +60,7 @@ static bool ike_state_change(private_load_tester_listener_t *this,
if (this->delete_after_established)
{
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)delete_ike_sa_job_create(id, TRUE));
}

View File

@ -22,6 +22,7 @@
#include <unistd.h>
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
#include <threading/condvar.h>
@ -221,7 +222,7 @@ plugin_t *load_tester_plugin_create()
this->running = 0;
for (i = 0; i < this->initiators; i++)
{
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)callback_job_create((callback_job_cb_t)do_load_test,
this, NULL, NULL));
}

View File

@ -18,6 +18,7 @@
#include "medcli_config.h"
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/callback_job.h>
@ -126,11 +127,11 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
med_cfg = peer_cfg_create(
"mediation", 2, ike_cfg,
CERT_NEVER_SEND, UNIQUE_REPLACE,
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
TRUE, NULL, NULL); /* mediation, med by, peer id */
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
TRUE, NULL, NULL); /* mediation, med by, peer id */
e->destroy(e);
auth = auth_cfg_create();
@ -163,10 +164,10 @@ static peer_cfg_t *get_peer_cfg_by_name(private_medcli_config_t *this, char *nam
peer_cfg = peer_cfg_create(
name, 2, this->ike->get_ref(this->ike),
CERT_NEVER_SEND, UNIQUE_REPLACE,
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
FALSE, med_cfg, /* mediation, med by */
identification_create_from_encoding(ID_KEY_ID, other));
@ -243,11 +244,11 @@ static bool peer_enumerator_enumerate(peer_enumerator_t *this, peer_cfg_t **cfg)
this->current = peer_cfg_create(
name, 2, this->ike->get_ref(this->ike),
CERT_NEVER_SEND, UNIQUE_REPLACE,
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
FALSE, NULL, NULL); /* mediation, med by, peer id */
1, this->rekey*60, 0, /* keytries, rekey, reauth */
this->rekey*5, this->rekey*3, /* jitter, overtime */
TRUE, this->dpd, /* mobike, dpddelay */
NULL, NULL, /* vip, pool */
FALSE, NULL, NULL); /* mediation, med by, peer id */
auth = auth_cfg_create();
auth->add(auth, AUTH_RULE_AUTH_CLASS, AUTH_CLASS_PUBKEY);
@ -364,7 +365,7 @@ static void schedule_autoinit(private_medcli_config_t *this)
if (peer_cfg)
{
/* schedule asynchronous initiation job */
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)callback_job_create(
(callback_job_cb_t)initiate_config,
peer_cfg, (void*)peer_cfg->destroy, NULL));

View File

@ -122,7 +122,7 @@ plugin_t *nm_plugin_create()
/* bypass file permissions to read from users ssh-agent */
charon->keep_cap(charon, CAP_DAC_OVERRIDE);
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)callback_job_create((callback_job_cb_t)run, this, NULL, NULL));
return &this->public.plugin;

View File

@ -28,6 +28,7 @@
#include <libxml/xmlwriter.h>
#include <library.h>
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@ -702,7 +703,7 @@ static job_requeue_t dispatch(private_smp_t *this)
fdp = malloc_thing(int);
*fdp = fd;
job = callback_job_create((callback_job_cb_t)process, fdp, free, this->job);
charon->processor->queue_job(charon->processor, (job_t*)job);
hydra->processor->queue_job(hydra->processor, (job_t*)job);
return JOB_REQUEUE_DIRECT;
}
@ -761,7 +762,7 @@ plugin_t *smp_plugin_create()
}
this->job = callback_job_create((callback_job_cb_t)dispatch, this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public.plugin;
}

View File

@ -15,6 +15,7 @@
#include "stroke_control.h"
#include <hydra.h>
#include <daemon.h>
#include <processing/jobs/delete_ike_sa_job.h>
@ -354,7 +355,7 @@ static void terminate_srcip(private_stroke_control_t *this,
}
/* schedule delete asynchronously */
charon->processor->queue_job(charon->processor, (job_t*)
hydra->processor->queue_job(hydra->processor, (job_t*)
delete_ike_sa_job_create(ike_sa->get_id(ike_sa), TRUE));
}
enumerator->destroy(enumerator);

View File

@ -21,6 +21,7 @@
#include <malloc.h>
#endif /* HAVE_MALLINFO */
#include <hydra.h>
#include <daemon.h>
#include <utils/linked_list.h>
#include <credentials/certificates/x509.h>
@ -422,10 +423,10 @@ static void status(private_stroke_list_t *this, stroke_msg_t *msg, FILE *out, bo
}
#endif /* HAVE_MALLINFO */
fprintf(out, " worker threads: %d idle of %d,",
charon->processor->get_idle_threads(charon->processor),
charon->processor->get_total_threads(charon->processor));
hydra->processor->get_idle_threads(hydra->processor),
hydra->processor->get_total_threads(hydra->processor));
fprintf(out, " job queue load: %d,",
charon->processor->get_job_load(charon->processor));
hydra->processor->get_job_load(hydra->processor));
fprintf(out, " scheduled events: %d\n",
charon->scheduler->get_job_load(charon->scheduler));
fprintf(out, " loaded plugins: ");

View File

@ -24,10 +24,10 @@
#include <unistd.h>
#include <errno.h>
#include <processing/jobs/callback_job.h>
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
#include "stroke_config.h"
#include "stroke_control.h"
@ -586,7 +586,7 @@ static job_requeue_t receive(private_stroke_socket_t *this)
ctx->this = this;
job = callback_job_create((callback_job_cb_t)process,
ctx, (void*)stroke_job_context_destroy, this->job);
charon->processor->queue_job(charon->processor, (job_t*)job);
hydra->processor->queue_job(hydra->processor, (job_t*)job);
return JOB_REQUEUE_FAIR;
}
@ -684,7 +684,7 @@ stroke_socket_t *stroke_socket_create()
this->job = callback_job_create((callback_job_cb_t)receive,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -24,6 +24,7 @@
#include "uci_control.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/thread.h>
#include <processing/jobs/callback_job.h>
@ -294,7 +295,7 @@ uci_control_t *uci_control_create()
{
this->job = callback_job_create((callback_job_cb_t)receive,
this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
}
return &this->public;
}

View File

@ -18,10 +18,11 @@
#include <semaphore.h>
#include <daemon.h>
#include <hydra.h>
#include <threading/thread.h>
#include <threading/condvar.h>
#include <threading/mutex.h>
#include <utils/linked_list.h>
typedef struct private_callback_job_t private_callback_job_t;
@ -226,7 +227,7 @@ static void execute(private_callback_job_t *this)
thread_cancellation_point();
if (requeue)
{
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
&this->public.job_interface);
}
thread_cleanup_pop(cleanup);

View File

@ -19,6 +19,7 @@
#include "scheduler.h"
#include <hydra.h>
#include <daemon.h>
#include <processing/processor.h>
#include <processing/jobs/callback_job.h>
@ -199,7 +200,7 @@ static job_requeue_t schedule(private_scheduler_t * this)
remove_event(this);
this->mutex->unlock(this->mutex);
DBG2(DBG_JOB, "got event, queuing job for execution");
charon->processor->queue_job(charon->processor, event->job);
hydra->processor->queue_job(hydra->processor, event->job);
free(event);
return JOB_REQUEUE_DIRECT;
}
@ -351,7 +352,7 @@ scheduler_t * scheduler_create()
this->condvar = condvar_create(CONDVAR_TYPE_DEFAULT);
this->job = callback_job_create((callback_job_cb_t)schedule, this, NULL, NULL);
charon->processor->queue_job(charon->processor, (job_t*)this->job);
hydra->processor->queue_job(hydra->processor, (job_t*)this->job);
return &this->public;
}

View File

@ -17,6 +17,7 @@
#include <math.h>
#include <hydra.h>
#include <daemon.h>
#include <threading/mutex.h>
#include <utils/linked_list.h>
@ -1222,7 +1223,7 @@ static void finish_checks(private_connect_manager_t *this, check_list_t *checkli
initiate_data_t *data = initiate_data_create(checklist, initiated);
job_t *job = (job_t*)callback_job_create((callback_job_cb_t)initiate_mediated, data, (callback_job_cleanup_t)initiate_data_destroy, NULL);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
return;
}
else
@ -1477,7 +1478,7 @@ static void check_and_initiate(private_connect_manager_t *this,
{
job_t *job = (job_t*)reinitiate_mediation_job_create(mediation_sa,
waiting_sa);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
}
iterator->destroy(iterator);

View File

@ -24,8 +24,8 @@
#include "ike_sa.h"
#include <library.h>
#include <daemon.h>
#include <hydra.h>
#include <daemon.h>
#include <utils/linked_list.h>
#include <utils/lexparser.h>
#include <sa/task_manager.h>
@ -1163,7 +1163,7 @@ METHOD(ike_sa_t, initiate, status_t,
{
/* mediated connection, initiate mediation process */
job_t *job = (job_t*)initiate_mediation_job_create(this->ike_sa_id);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
return SUCCESS;
}
#endif /* ME */
@ -1709,7 +1709,7 @@ METHOD(ike_sa_t, set_auth_lifetime, void,
{
DBG1(DBG_IKE, "received AUTH_LIFETIME of %ds, starting reauthentication",
lifetime);
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)rekey_ike_sa_job_create(this->ike_sa_id, TRUE));
}
else if (this->stats[STAT_REAUTH] == 0 ||

View File

@ -15,6 +15,7 @@
#include "mediation_manager.h"
#include <hydra.h>
#include <daemon.h>
#include <threading/mutex.h>
#include <utils/linked_list.h>
@ -241,7 +242,7 @@ static void update_sa_id(private_mediation_manager_t *this, identification_t *pe
(void**)&requester) == SUCCESS)
{
job_t *job = (job_t*)mediation_callback_job_create(requester, peer_id);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
requester->destroy(requester);
}

View File

@ -16,6 +16,7 @@
#include "child_rekey.h"
#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/child_create.h>
@ -299,7 +300,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);
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;

View File

@ -17,6 +17,7 @@
#include <string.h>
#include <hydra.h>
#include <daemon.h>
#include <config/peer_cfg.h>
#include <encoding/payloads/id_payload.h>
@ -692,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);
charon->processor->queue_job(charon->processor, job);
hydra->processor->queue_job(hydra->processor, job);
break;
}
default:

View File

@ -16,6 +16,7 @@
#include "ike_rekey.h"
#include <hydra.h>
#include <daemon.h>
#include <encoding/payloads/notify_payload.h>
#include <sa/tasks/ike_init.h>
@ -196,7 +197,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);
charon->processor->queue_job(charon->processor,
hydra->processor->queue_job(hydra->processor,
(job_t*)rekey_ike_sa_job_create(
this->ike_sa->get_id(this->ike_sa), TRUE));
return SUCCESS;

View File

@ -20,6 +20,7 @@
#include "processor.h"
#include <debug.h>
#include <threading/thread.h>
#include <threading/condvar.h>
#include <threading/mutex.h>