summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7595db8)
raw | patch | inline | side by side (parent: 7595db8)
author | Luke Heberling <collectd@c-ware.com> | |
Thu, 20 Aug 2009 12:10:37 +0000 (14:10 +0200) | ||
committer | Florian Forster <octo@huhu.verplant.org> | |
Thu, 20 Aug 2009 12:10:37 +0000 (14:10 +0200) |
→ See also: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=535787
src/powerdns.c | patch | blob | history |
diff --git a/src/powerdns.c b/src/powerdns.c
index 09ad83534cdda6bb6cf913c3ae9da409bdbffffd..7288c37239b4f55a9477ae7d8c07be4d57accfa9 100644 (file)
--- a/src/powerdns.c
+++ b/src/powerdns.c
powerdns_config_add_server (option);
else if (strcasecmp ("LocalSocket", option->key) == 0)
{
- char *temp = strdup (option->key);
- if (temp == NULL)
- return (1);
- sfree (local_sockpath);
- local_sockpath = temp;
+ if ((option->values_num != 1) || (option->values[0].type != OCONFIG_TYPE_STRING))
+ {
+ WARNING ("powerdns plugin: `%s' needs exactly one string argument.", option->key);
+ }
+ else
+ {
+ char *temp = strdup (option->values[0].value.string);
+ if (temp == NULL)
+ return (1);
+ sfree (local_sockpath);
+ local_sockpath = temp;
+ }
}
else
{