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:
@@ -138,7 +138,8 @@ METHOD(job_t, initiate, job_requeue_t,
|
||||
mediation_cfg->get_ref(mediation_cfg);
|
||||
|
||||
if (charon->controller->initiate(charon->controller, mediation_cfg, NULL,
|
||||
(controller_cb_t)initiate_callback, this, 0, FALSE) != SUCCESS)
|
||||
(controller_cb_t)initiate_callback, this, LEVEL_CTRL,
|
||||
0, FALSE) != SUCCESS)
|
||||
{
|
||||
mediation_cfg->destroy(mediation_cfg);
|
||||
mediated_cfg->destroy(mediated_cfg);
|
||||
|
||||
@@ -84,7 +84,7 @@ METHOD(job_t, execute, job_requeue_t,
|
||||
charon->controller->initiate(charon->controller,
|
||||
peer_cfg->get_ref(peer_cfg),
|
||||
child_cfg->get_ref(child_cfg),
|
||||
NULL, NULL, 0, FALSE);
|
||||
NULL, NULL, 0, 0, FALSE);
|
||||
}
|
||||
}
|
||||
children->destroy(children);
|
||||
|
||||
Reference in New Issue
Block a user