Refer to processor via hydra and not charon.
authorTobias Brunner <tobias@strongswan.org>
Mon, 5 Jul 2010 11:52:05 +0000 (13:52 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 2 Sep 2010 17:01:22 +0000 (19:01 +0200)
34 files changed:
src/libcharon/bus/bus.c
src/libcharon/daemon.c
src/libcharon/network/receiver.c
src/libcharon/network/sender.c
src/libcharon/plugins/android/android_service.c
src/libcharon/plugins/dhcp/dhcp_socket.c
src/libcharon/plugins/farp/farp_spoofer.c
src/libcharon/plugins/ha/ha_ctl.c
src/libcharon/plugins/ha/ha_dispatcher.c
src/libcharon/plugins/ha/ha_segments.c
src/libcharon/plugins/ha/ha_socket.c
src/libcharon/plugins/kernel_klips/kernel_klips_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_ipsec.c
src/libcharon/plugins/kernel_netlink/kernel_netlink_net.c
src/libcharon/plugins/kernel_pfkey/kernel_pfkey_ipsec.c
src/libcharon/plugins/kernel_pfroute/kernel_pfroute_net.c
src/libcharon/plugins/load_tester/load_tester_listener.c
src/libcharon/plugins/load_tester/load_tester_plugin.c
src/libcharon/plugins/medcli/medcli_config.c
src/libcharon/plugins/nm/nm_plugin.c
src/libcharon/plugins/smp/smp.c
src/libcharon/plugins/stroke/stroke_control.c
src/libcharon/plugins/stroke/stroke_list.c
src/libcharon/plugins/stroke/stroke_socket.c
src/libcharon/plugins/uci/uci_control.c
src/libcharon/processing/jobs/callback_job.c
src/libcharon/processing/scheduler.c
src/libcharon/sa/connect_manager.c
src/libcharon/sa/ike_sa.c
src/libcharon/sa/mediation_manager.c
src/libcharon/sa/tasks/child_rekey.c
src/libcharon/sa/tasks/ike_me.c
src/libcharon/sa/tasks/ike_rekey.c
src/libhydra/processing/processor.c

index 441009e..d017c2a 100644 (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);
index 2f4c1c1..f414db9 100644 (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 */
index 1a25d45..cc73ba8 100644 (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;
 }
index bb6d506..5413842 100644 (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;
 }
index 538c4a9..235679a 100644 (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;
 }
index f61b3a6..4a6b451 100644 (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;
 }
index 20bb44f..031f476 100644 (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;
 }
index e188a84..781918c 100644 (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;
 }
 
index 3bc426e..b6007b8 100644 (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;
 }
index c8c2085..8d6fff4 100644 (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,
index 21e6eb6..50c10b9 100644 (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));
index f8a5d5b..81e46da 100644 (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;
 }
index dcd6871..9ba5391 100644 (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;
 }
index 6750458..5240d3d 100644 (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)
        {
index b01f627..6773dcf 100644 (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;
 }
index 97c019b..6c06b62 100644 (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)
        {
index 96b0cf1..19a38d9 100644 (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));
                }
 
index 15dbccb..c9384d5 100644 (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));
        }
index 6cbaf36..aafe33a 100644 (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));
index 250e6f7..e1da782 100644 (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;
index 64820eb..c891c32 100644 (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;
 }
index f644215..f009d07 100644 (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);
index bd89181..9106a4f 100644 (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: ");
index 06a636a..891128f 100644 (file)
 #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;
 }
index 3c4928b..0736ed5 100644 (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;
 }
index 45e4911..4c9a7fd 100644 (file)
 
 #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);
index 345af50..85796ba 100644 (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;
 }
index 8e8e19b..fa87715 100644 (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);
 
index b163837..a7b6cce 100644 (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 ||
index 035f490..0efbdc2 100644 (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);
        }
 
index c87a3ef..b53bfd4 100644 (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;
index a04bf56..1b37716 100644 (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:
index ea7782b..a066adc 100644 (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;
index 731c9e2..2a44f61 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "processor.h"
 
+#include <debug.h>
 #include <threading/thread.h>
 #include <threading/condvar.h>
 #include <threading/mutex.h>