controller: Add parameter for maximum log level to initiate/terminate_*()
Previously, the logger installed by the controller always announced LEVEL_PRIVATE(4), which produced completely useless logging calls with the common clients (vici/stroke) whose default log level is LEVEL_CTRL(1). This can produce quite some overhead if there are e.g. a lot of concurrent initiate() calls.
This commit is contained in:
@@ -133,7 +133,7 @@ static void stop_connection(private_xpc_channels_t *this, uint32_t ike_sa,
|
||||
status_t status;
|
||||
|
||||
status = charon->controller->terminate_ike(charon->controller, ike_sa, FALSE,
|
||||
NULL, NULL, 0);
|
||||
NULL, NULL, 0, 0);
|
||||
xpc_dictionary_set_bool(reply, "success", status != NOT_FOUND);
|
||||
}
|
||||
|
||||
|
||||
@@ -207,7 +207,7 @@ void start_connection(private_xpc_dispatch_t *this,
|
||||
peer_cfg->add_child_cfg(peer_cfg, child_cfg->get_ref(child_cfg));
|
||||
|
||||
if (charon->controller->initiate(charon->controller, peer_cfg, child_cfg,
|
||||
(controller_cb_t)initiate_cb, &ike_sa, 0, FALSE) == NEED_MORE)
|
||||
(controller_cb_t)initiate_cb, &ike_sa, LEVEL_CTRL, 0, FALSE) == NEED_MORE)
|
||||
{
|
||||
this->channels->add(this->channels, channel, ike_sa);
|
||||
success = TRUE;
|
||||
|
||||
Reference in New Issue
Block a user