Centralized thread cancellation in processor_t
This ensures that no threads are active when plugins and the rest of the daemon are unloaded. callback_job_t was simplified a lot in the process as its main functionality is now contained in processor_t. The parent-child relationships were abandoned as these were only needed to simplify job cancellation.
This commit is contained in:
@@ -41,11 +41,6 @@ struct private_android_service_t {
|
||||
*/
|
||||
ike_sa_t *ike_sa;
|
||||
|
||||
/**
|
||||
* job that handles requests from the Android control socket
|
||||
*/
|
||||
callback_job_t *job;
|
||||
|
||||
/**
|
||||
* android credentials
|
||||
*/
|
||||
@@ -384,9 +379,9 @@ 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);
|
||||
lib->processor->queue_job(lib->processor, (job_t*)this->job);
|
||||
lib->processor->queue_job(lib->processor,
|
||||
(job_t*)callback_job_create((callback_job_cb_t)initiate, this,
|
||||
NULL, NULL));
|
||||
|
||||
return &this->public;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user