projects
/
collectd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'collectd-5.0' into collectd-5.1
[collectd.git]
/
src
/
rrdcached.c
diff --git
a/src/rrdcached.c
b/src/rrdcached.c
index
f53ccad
..
11c1c6a
100644
(file)
--- a/
src/rrdcached.c
+++ b/
src/rrdcached.c
@@
-164,13
+164,20
@@
static int value_list_to_filename (char *buffer, int buffer_len,
static const char *config_get_string (oconfig_item_t *ci)
{
if ((ci->children_num != 0) || (ci->values_num != 1)
static const char *config_get_string (oconfig_item_t *ci)
{
if ((ci->children_num != 0) || (ci->values_num != 1)
- || (ci->values[0].type != OCONFIG_TYPE_STRING))
+ || ((ci->values[0].type != OCONFIG_TYPE_STRING)
+ && (ci->values[0].type != OCONFIG_TYPE_BOOLEAN)))
{
ERROR ("rrdcached plugin: %s expects a single string argument.",
ci->key);
return (NULL);
}
{
ERROR ("rrdcached plugin: %s expects a single string argument.",
ci->key);
return (NULL);
}
+ if (ci->values[0].type == OCONFIG_TYPE_BOOLEAN) {
+ if (ci->values[0].value.boolean)
+ return "true";
+ else
+ return "false";
+ }
return (ci->values[0].value.string);
} /* const char *config_get_string */
return (ci->values[0].value.string);
} /* const char *config_get_string */