summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e48ff35)
raw | patch | inline | side by side (parent: e48ff35)
author | Sebastian Harl <sh@tokkee.org> | |
Sat, 28 Jun 2014 07:27:30 +0000 (09:27 +0200) | ||
committer | Sebastian Harl <sh@tokkee.org> | |
Sat, 28 Jun 2014 07:27:30 +0000 (09:27 +0200) |
There's no need for any duplication.
index 21e1f8b2bda204183b3414b2668fafedda8b0eb4..00e1258eb222761d052a556824deac68fb690997 100644 (file)
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "collectd::unixsock");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"backend accessing the system statistics collection daemon "
"throught the UNIXSOCK interface");
index eb544b8b24bcd4e00717eaa7dea7b47eb6c7fc99..6481807637fb9bfba7ffeb5d584a19b083cf7410 100644 (file)
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "MK-Livestatus");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"backend accessing Nagios/Icinga/Shinken using MK Livestatus");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,
index 23d261bacf46baf7b3939f5718fe529c714f98d7..ebe5dbd6468821d929a43d31d5e53178069063af 100644 (file)
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "puppet::store-configs");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"backend accessing the Puppet stored configuration database");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,
diff --git a/src/core/plugin.c b/src/core/plugin.c
index 32966deabcf8042dbf58e120016419833a05dde0..0e87ce5a9f51f5a719031e36b0dc83460729bb83 100644 (file)
--- a/src/core/plugin.c
+++ b/src/core/plugin.c
char *filename;
/* public attributes */
- char *name;
-
char *description;
char *copyright;
char *license;
int plugin_version;
};
#define SDB_PLUGIN_INFO_INIT { \
- /* plugin_name */ NULL, /* filename */ NULL, \
- /* name */ NULL, /* desc */ NULL, \
+ /* plugin_name */ NULL, /* filename */ NULL, /* desc */ NULL, \
/* copyright */ NULL, /* license */ NULL, \
/* version */ -1, /* plugin_version */ -1 }
#define INFO_GET(i, attr) \
if (info->filename)
free(info->filename);
- if (info->name)
- free(info->name);
if (info->description)
free(info->description);
if (info->copyright)
sdb_log(SDB_LOG_INFO, "core: Successfully loaded "
"plugin '%s' v%i (%s)\n\t%s\n\tLicense: %s",
- INFO_GET(&ctx->info, name), ctx->info.plugin_version,
+ ctx->info.plugin_name, ctx->info.plugin_version,
INFO_GET(&ctx->info, description),
INFO_GET(&ctx->info, copyright),
INFO_GET(&ctx->info, license));
return status;
sdb_log(SDB_LOG_INFO, "core: Successfully reloaded plugin "
- "'%s' (%s)", INFO_GET(&ctx->info, name),
+ "'%s' (%s)", ctx->info.plugin_name,
INFO_GET(&ctx->info, description));
ctx_set(old_ctx);
}
va_start(ap, type);
switch (type) {
- case SDB_PLUGIN_INFO_NAME:
- {
- char *name = va_arg(ap, char *);
- if (name) {
- if (info->name)
- free(info->name);
- info->name = strdup(name);
- }
- }
- break;
case SDB_PLUGIN_INFO_DESC:
{
char *desc = va_arg(ap, char *);
index bcf01ec411bd5d2dc7e3ab25d17a99f88edd7037..3d938807f61d2c1098dae31429157946b908b2f8 100644 (file)
* and also to provide additional information to the user.
*/
enum {
- SDB_PLUGIN_INFO_NAME, /* plugin name: string */
SDB_PLUGIN_INFO_DESC, /* plugin description: string */
SDB_PLUGIN_INFO_COPYRIGHT, /* plugin copyright: string */
SDB_PLUGIN_INFO_LICENSE, /* plugin license: string */
index b35ebf1666e662984d1aea372f3fd802ef259c05..e54ce7cd739de3face3c94ef2023a412146142e4 100644 (file)
--- a/src/plugins/cname/dns.c
+++ b/src/plugins/cname/dns.c
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "cname::dns");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"canonicalize hostnames by querying DNS");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,
diff --git a/src/plugins/syslog.c b/src/plugins/syslog.c
index f9a285e98cd484bff8c36022a9fd427442567639..02c62414b6856cd7003c1fd677f312007826b1ce 100644 (file)
--- a/src/plugins/syslog.c
+++ b/src/plugins/syslog.c
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "syslog");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC,
"log messages to the system logger");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,
index 2573e64765543ee4c6cc2802250083d8ed362eec..8dcb410af3492a0da588c6ba56f5cc7c3b5ddfaf 100644 (file)
int
sdb_module_init(sdb_plugin_info_t *info)
{
- sdb_plugin_set_info(info, SDB_PLUGIN_INFO_NAME, "test::integration::mock");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_DESC, "a mock plugin");
sdb_plugin_set_info(info, SDB_PLUGIN_INFO_COPYRIGHT,
"Copyright (C) 2012 Sebastian 'tokkee' Harl <sh@tokkee.org>");