bus->listen() and the controller wrappers accept a timeout to wait for callbacks
This commit is contained in:
@@ -148,7 +148,7 @@ static job_requeue_t do_load_test(private_load_tester_plugin_t *this)
|
||||
|
||||
charon->controller->initiate(charon->controller,
|
||||
peer_cfg, child_cfg->get_ref(child_cfg),
|
||||
NULL, NULL);
|
||||
NULL, NULL, 0);
|
||||
if (s)
|
||||
{
|
||||
sleep(s);
|
||||
|
||||
@@ -217,7 +217,7 @@ static void disconnect(private_maemo_service_t *this)
|
||||
id = ike_sa->get_unique_id(ike_sa);
|
||||
charon->ike_sa_manager->checkin(charon->ike_sa_manager, ike_sa);
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
NULL, NULL);
|
||||
NULL, NULL, 0);
|
||||
}
|
||||
this->current = (g_free(this->current), NULL);
|
||||
this->status = VPN_STATUS_DISCONNECTED;
|
||||
|
||||
@@ -335,7 +335,7 @@ static job_requeue_t initiate_config(peer_cfg_t *peer_cfg)
|
||||
peer_cfg->get_ref(peer_cfg);
|
||||
enumerator->destroy(enumerator);
|
||||
charon->controller->initiate(charon->controller,
|
||||
peer_cfg, child_cfg, NULL, NULL);
|
||||
peer_cfg, child_cfg, NULL, NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -640,7 +640,7 @@ static gboolean disconnect(NMVPNPlugin *plugin, GError **err)
|
||||
id = ike_sa->get_unique_id(ike_sa);
|
||||
enumerator->destroy(enumerator);
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
controller_cb_empty, NULL);
|
||||
controller_cb_empty, NULL, 0);
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -421,14 +421,14 @@ static void request_control_terminate(xmlTextReaderPtr reader,
|
||||
if (ike)
|
||||
{
|
||||
status = charon->controller->terminate_ike(
|
||||
charon->controller, id,
|
||||
(controller_cb_t)xml_callback, writer);
|
||||
charon->controller, id,
|
||||
(controller_cb_t)xml_callback, writer, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
status = charon->controller->terminate_child(
|
||||
charon->controller, id,
|
||||
(controller_cb_t)xml_callback, writer);
|
||||
charon->controller, id,
|
||||
(controller_cb_t)xml_callback, writer, 0);
|
||||
}
|
||||
/* </log> */
|
||||
xmlTextWriterEndElement(writer);
|
||||
@@ -490,7 +490,7 @@ static void request_control_initiate(xmlTextReaderPtr reader,
|
||||
{
|
||||
status = charon->controller->initiate(charon->controller,
|
||||
peer, child, (controller_cb_t)xml_callback,
|
||||
writer);
|
||||
writer, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -103,14 +103,14 @@ static void charon_initiate(peer_cfg_t *peer_cfg, child_cfg_t *child_cfg,
|
||||
if (msg->output_verbosity < 0)
|
||||
{
|
||||
charon->controller->initiate(charon->controller, peer_cfg, child_cfg,
|
||||
NULL, NULL);
|
||||
NULL, NULL, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
stroke_log_info_t info = { msg->output_verbosity, out };
|
||||
|
||||
charon->controller->initiate(charon->controller, peer_cfg, child_cfg,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -277,12 +277,12 @@ METHOD(stroke_control_t, terminate, void,
|
||||
if (child)
|
||||
{
|
||||
charon->controller->terminate_child(charon->controller, id,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
return;
|
||||
}
|
||||
@@ -333,7 +333,7 @@ METHOD(stroke_control_t, terminate, void,
|
||||
while (enumerator->enumerate(enumerator, &del))
|
||||
{
|
||||
charon->controller->terminate_child(charon->controller, del,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
@@ -341,7 +341,7 @@ METHOD(stroke_control_t, terminate, void,
|
||||
while (enumerator->enumerate(enumerator, &del))
|
||||
{
|
||||
charon->controller->terminate_ike(charon->controller, del,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
|
||||
@@ -515,7 +515,7 @@ METHOD(stroke_control_t, purge_ike, void,
|
||||
while (enumerator->enumerate(enumerator, &del))
|
||||
{
|
||||
charon->controller->terminate_ike(charon->controller, del,
|
||||
(controller_cb_t)stroke_log, &info);
|
||||
(controller_cb_t)stroke_log, &info, 0);
|
||||
}
|
||||
enumerator->destroy(enumerator);
|
||||
list->destroy(list);
|
||||
@@ -544,7 +544,7 @@ static void charon_route(peer_cfg_t *peer_cfg, child_cfg_t *child_cfg,
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
{
|
||||
if (charon->traps->install(charon->traps, peer_cfg, child_cfg))
|
||||
{
|
||||
fprintf(out, "'%s' routed\n", name);
|
||||
|
||||
@@ -148,8 +148,8 @@ static void initiate(private_uci_control_t *this, char *name)
|
||||
enumerator = peer_cfg->create_child_cfg_enumerator(peer_cfg);
|
||||
if (enumerator->enumerate(enumerator, &child_cfg) &&
|
||||
charon->controller->initiate(charon->controller, peer_cfg,
|
||||
child_cfg->get_ref(child_cfg),
|
||||
controller_cb_empty, NULL) == SUCCESS)
|
||||
child_cfg->get_ref(child_cfg),
|
||||
controller_cb_empty, NULL, 0) == SUCCESS)
|
||||
{
|
||||
write_fifo(this, "connection '%s' established\n", name);
|
||||
}
|
||||
@@ -183,7 +183,7 @@ static void terminate(private_uci_control_t *this, char *name)
|
||||
id = ike_sa->get_unique_id(ike_sa);
|
||||
enumerator->destroy(enumerator);
|
||||
charon->controller->terminate_ike(charon->controller, id,
|
||||
controller_cb_empty, NULL);
|
||||
controller_cb_empty, NULL, 0);
|
||||
write_fifo(this, "connection '%s' terminated\n", name);
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user