X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=b2cebbf8f283a1b75f67c4934a294dc92d5b02f2;hb=711f5b6c86f51061c21bedcaa46214a01de0125c;hp=729a15b473dbcec0dcfbc2ca8387e5d060f08e12;hpb=358bf39b09f69220fc8e1b6c2fe98e5e185e3364;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index 729a15b4..b2cebbf8 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -279,7 +279,7 @@ static statname_lookup_t lookup_table[] = /* {{{ */ {"ipv6-questions", "dns_question", "incoming-ipv6"}, {"malloc-bytes", "gauge", "malloc_bytes"}, {"max-mthread-stack", "gauge", "max_mthread_stack"}, - {"no-packet-error", "gauge", "no_packet_error"}, + {"no-packet-error", "errors", "no_packet_error"}, {"noedns-outqueries", "dns_question", "outgoing-noedns"}, {"noping-outqueries", "dns_question", "outgoing-noping"}, {"over-capacity-drops", "dns_question", "incoming-over_capacity"}, @@ -304,10 +304,10 @@ static statname_lookup_t lookup_table[] = /* {{{ */ {"uptime", "uptime", NULL}}; /* }}} */ static int lookup_table_length = STATIC_ARRAY_SIZE(lookup_table); -static llist_t *list = NULL; +static llist_t *list; #define PDNS_LOCAL_SOCKPATH LOCALSTATEDIR "/run/" PACKAGE_NAME "-powerdns" -static char *local_sockpath = NULL; +static char *local_sockpath; /* TODO: Do this before 4.4: * - Update the collectd.conf(5) manpage. @@ -359,9 +359,6 @@ static void submit(const char *plugin_instance, /* {{{ */ } if (0 != parse_value(value_str, &value, ds->ds[0].type)) { - ERROR("powerdns plugin: Cannot convert `%s' " - "to a number.", - value_str); return; } @@ -472,7 +469,7 @@ static int powerdns_get_data_dgram(list_item_t *item, char **ret_buffer) { } memcpy(buffer, temp, buffer_size - 1); - buffer[buffer_size - 1] = 0; + buffer[buffer_size - 1] = '\0'; *ret_buffer = buffer; return 0;