Refer to processor via hydra and not charon.

This commit is contained in:
Tobias Brunner
2010-09-02 19:01:22 +02:00
parent 633fbe4fde
commit c5f7146b17
34 changed files with 101 additions and 71 deletions
@@ -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);
+4 -3
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: ");
+3 -3
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;
}