require explicit enabling of load-testing plugin

This commit is contained in:
Martin Willi 2008-12-09 09:11:37 +00:00
parent 5bdc8fc794
commit 15ed045c87
1 changed files with 9 additions and 1 deletions

View File

@ -176,9 +176,17 @@ static void destroy(private_load_tester_plugin_t *this)
*/
plugin_t *plugin_create()
{
private_load_tester_plugin_t *this = malloc_thing(private_load_tester_plugin_t);
private_load_tester_plugin_t *this;
int i;
if (!lib->settings->get_bool(lib->settings,
"charon.plugins.load_tester.enable", FALSE))
{
DBG1(DBG_CFG, "disabling load-tester plugin, not configured");
return NULL;
}
this = malloc_thing(private_load_tester_plugin_t);
this->public.plugin.destroy = (void(*)(plugin_t*))destroy;
lib->crypto->add_dh(lib->crypto, MODP_NULL,