Use CRITICAL job priority class for long running dispatcher jobs
[strongswan.git] / src / libcharon / plugins / smp / smp.c
index d20f322..58f98cf 100644 (file)
@@ -208,7 +208,8 @@ static void request_query_ikesa(xmlTextReaderPtr reader, xmlTextWriterPtr writer
        /* <ikesalist> */
        xmlTextWriterStartElement(writer, "ikesalist");
 
-       enumerator = charon->controller->create_ike_sa_enumerator(charon->controller);
+       enumerator = charon->controller->create_ike_sa_enumerator(
+                                                                                                       charon->controller, TRUE);
        while (enumerator->enumerate(enumerator, &ike_sa))
        {
                ike_sa_id_t *id;
@@ -394,7 +395,8 @@ static void request_control_terminate(xmlTextReaderPtr reader,
                        enumerator_t *enumerator;
                        ike_sa_t *ike_sa;
 
-                       enumerator = charon->controller->create_ike_sa_enumerator(charon->controller);
+                       enumerator = charon->controller->create_ike_sa_enumerator(
+                                                                                                       charon->controller, TRUE);
                        while (enumerator->enumerate(enumerator, &ike_sa))
                        {
                                if (streq(str, ike_sa->get_name(ike_sa)))
@@ -772,7 +774,8 @@ plugin_t *smp_plugin_create()
                return NULL;
        }
 
-       this->job = callback_job_create((callback_job_cb_t)dispatch, this, NULL, NULL);
+       this->job = callback_job_create_with_prio((callback_job_cb_t)dispatch,
+                                                                               this, NULL, NULL, JOB_PRIO_CRITICAL);
        lib->processor->queue_job(lib->processor, (job_t*)this->job);
 
        return &this->public.plugin;