X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=7e9e8747cb6e8b2bc5e36ec9b496bb06af5b02cc;hb=04f27bdd38966e0b826b283d8790ce31fb467929;hp=f907d006ed6172a5cf9129ba374e0bffd41a0d4c;hpb=f876292e5ce4be40ab5b031b2bcfb347f00da1f8;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index f907d006..7e9e8747 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -300,10 +300,10 @@ static char *local_sockpath = NULL; /* */ static void submit (const char *plugin_instance, /* {{{ */ - const char *pdns_type, const char *value) + const char *pdns_type, const char *value_str) { value_list_t vl = VALUE_LIST_INIT; - value_t values[1]; + value_t value; const char *type = NULL; const char *type_instance = NULL; @@ -318,7 +318,7 @@ static void submit (const char *plugin_instance, /* {{{ */ if (i >= lookup_table_length) { INFO ("powerdns plugin: submit: Not found in lookup table: %s = %s;", - pdns_type, value); + pdns_type, value_str); return; } @@ -345,16 +345,15 @@ static void submit (const char *plugin_instance, /* {{{ */ return; } - if (0 != parse_value (value, &values[0], ds->ds[0].type)) + if (0 != parse_value (value_str, &value, ds->ds[0].type)) { ERROR ("powerdns plugin: Cannot convert `%s' " - "to a number.", value); + "to a number.", value_str); return; } - vl.values = values; + vl.values = &value; vl.values_len = 1; - sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "powerdns", sizeof (vl.plugin)); sstrncpy (vl.type, type, sizeof (vl.type)); if (type_instance != NULL)