Skip to content

Commit 388d3d4

Browse files
author
Petr Velan
committed
Merge pull request #89 from SecDorks/ipfixcol_init
Configurator: fixed logging consistency
2 parents d2794f7 + 4bc1b9e commit 388d3d4

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

base/src/configurator.c

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -328,11 +328,11 @@ int config_add_input(configurator *config, struct plugin_config *plugin, int ind
328328
/* check api version */
329329
unsigned int *plugin_api_version = (unsigned int *) dlsym(config->input.dll_handler, "ipfixcol_api_version");
330330
if (!plugin_api_version) { /* no api version symbol */
331-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s). API version number is missing",
332-
config->proc_id, plugin->conf.name, plugin->conf.file);
331+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s'; API version number is missing...",
332+
config->proc_id, plugin->conf.name, plugin->conf.file);
333333
goto err;
334334
} else if (*plugin_api_version != IPFIXCOL_API_VERSION_NUMBER) { /* wrong api version */
335-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s) with version %ui. Version %ui is required",
335+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s' with version %ui; at least version %ui is required...",
336336
config->proc_id, plugin->conf.name, plugin->conf.file, *plugin_api_version, IPFIXCOL_API_VERSION_NUMBER);
337337
goto err;
338338
}
@@ -417,11 +417,11 @@ int config_add_inter(configurator *config, struct plugin_config *plugin, int ind
417417
/* check api version */
418418
unsigned int *plugin_api_version = (unsigned int *) dlsym(im_plugin->dll_handler, "ipfixcol_api_version");
419419
if (!plugin_api_version) { /* no api version symbol */
420-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s). API version number is missing",
421-
config->proc_id, plugin->conf.name, plugin->conf.file);
420+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s'; API version number is missing...",
421+
config->proc_id, plugin->conf.name, plugin->conf.file);
422422
goto err;
423423
} else if (*plugin_api_version != IPFIXCOL_API_VERSION_NUMBER) { /* wrong api version */
424-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s) with version %ui. Version %ui is required",
424+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s' with version %ui; at least version %ui is required...",
425425
config->proc_id, plugin->conf.name, plugin->conf.file, *plugin_api_version, IPFIXCOL_API_VERSION_NUMBER);
426426
goto err;
427427
}
@@ -535,11 +535,11 @@ int config_add_storage(configurator *config, struct plugin_config *plugin, int i
535535
/* check api version */
536536
unsigned int *plugin_api_version = (unsigned int *) dlsym(st_plugin->dll_handler, "ipfixcol_api_version");
537537
if (!plugin_api_version) { /* no api version symbol */
538-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s). API version number is missing",
539-
config->proc_id, plugin->conf.name, plugin->conf.file);
538+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s'; API version number is missing...",
539+
config->proc_id, plugin->conf.name, plugin->conf.file);
540540
goto err;
541541
} else if (*plugin_api_version != IPFIXCOL_API_VERSION_NUMBER) { /* wrong api version */
542-
MSG_ERROR(msg_module, "[%d] Unable to load plugin %s (%s) with version %ui. Version %ui is required",
542+
MSG_ERROR(msg_module, "[%d] Unable to load plugin '%s' with version %ui; at least version %ui is required...",
543543
config->proc_id, plugin->conf.name, plugin->conf.file, *plugin_api_version, IPFIXCOL_API_VERSION_NUMBER);
544544
goto err;
545545
}

0 commit comments

Comments
 (0)