summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8d787a8)
raw | patch | inline | side by side (parent: 8d787a8)
author | Manuel Luis SanmartĂn Rozada <manuel.luis@gmail.com> | |
Wed, 20 May 2015 20:06:18 +0000 (22:06 +0200) | ||
committer | Florian Forster <octo@collectd.org> | |
Tue, 16 Jun 2015 18:45:17 +0000 (20:45 +0200) |
src/daemon/configfile.c | patch | blob | history |
index 2636a522bd45e5d50b3edb3ccd4ac8aab3264911..765a23c4d19acaf6b695f23fc909d972f56ec417 100644 (file)
--- a/src/daemon/configfile.c
+++ b/src/daemon/configfile.c
typedef struct cf_value_map_s
{
char *key;
- int (*func) (const oconfig_item_t *);
+ int (*func) (oconfig_item_t *);
} cf_value_map_t;
typedef struct cf_global_option_s
/*
* Prototypes of callback functions
*/
-static int dispatch_value_typesdb (const oconfig_item_t *ci);
-static int dispatch_value_plugindir (const oconfig_item_t *ci);
-static int dispatch_loadplugin (const oconfig_item_t *ci);
+static int dispatch_value_typesdb (oconfig_item_t *ci);
+static int dispatch_value_plugindir (oconfig_item_t *ci);
+static int dispatch_loadplugin (oconfig_item_t *ci);
+static int dispatch_block_plugin (oconfig_item_t *ci);
/*
* Private variables
{
{"TypesDB", dispatch_value_typesdb},
{"PluginDir", dispatch_value_plugindir},
- {"LoadPlugin", dispatch_loadplugin}
+ {"LoadPlugin", dispatch_loadplugin},
+ {"Plugin", dispatch_block_plugin}
};
static int cf_value_map_num = STATIC_ARRAY_SIZE (cf_value_map);
return (-1);
} /* int dispatch_global_option */
-static int dispatch_value_typesdb (const oconfig_item_t *ci)
+static int dispatch_value_typesdb (oconfig_item_t *ci)
{
int i = 0;
return (0);
} /* int dispatch_value_typesdb */
-static int dispatch_value_plugindir (const oconfig_item_t *ci)
+static int dispatch_value_plugindir (oconfig_item_t *ci)
{
assert (strcasecmp (ci->key, "PluginDir") == 0);
return (0);
}
-static int dispatch_loadplugin (const oconfig_item_t *ci)
+static int dispatch_loadplugin (oconfig_item_t *ci)
{
int i;
const char *name;
return (cf_dispatch (plugin, ci->key, buffer_ptr));
} /* int dispatch_value_plugin */
-static int dispatch_value (const oconfig_item_t *ci)
+static int dispatch_value (oconfig_item_t *ci)
{
int ret = -2;
int i;