X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=eb541800363b2f67a47b6f11812a752bf8b1af3b;hb=51bc7c4a5523f2b03c24e32064b28c7c8426534d;hp=f907d006ed6172a5cf9129ba374e0bffd41a0d4c;hpb=02f8dbc0985310574ea2837cd5e3c06cccda203d;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index f907d006..eb541800 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,14 +345,14 @@ 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));