X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fpowerdns.c;h=03a49b5643af23a6e2ebc2ccc954586ea1ffff6f;hb=4e52c1dcb4a8595b5f6e5d9f3df291a488a6fab8;hp=a1b23555bec080592a261f91e1d6e02ae769bd6a;hpb=3427c2e266c04d67848bda913caa730a395c7295;p=collectd.git diff --git a/src/powerdns.c b/src/powerdns.c index a1b23555..03a49b56 100644 --- a/src/powerdns.c +++ b/src/powerdns.c @@ -18,7 +18,7 @@ * * Author: * Luke Heberling - * Florian Forster + * Florian Forster * * DESCRIPTION * Queries a PowerDNS control socket for statistics @@ -259,9 +259,6 @@ static void submit (const char *plugin_instance, /* {{{ */ if (strcmp (lookup_table[i].name, pdns_type) == 0) break; - if (lookup_table[i].type == NULL) - return; - if (i >= lookup_table_length) { INFO ("powerdns plugin: submit: Not found in lookup table: %s = %s;", @@ -269,6 +266,9 @@ static void submit (const char *plugin_instance, /* {{{ */ return; } + if (lookup_table[i].type == NULL) + return; + type = lookup_table[i].type; type_instance = lookup_table[i].type_instance; @@ -364,7 +364,7 @@ static int powerdns_get_data_dgram (list_item_t *item, /* {{{ */ break; } - cdt_timeout = interval_g * 3 / 4; + cdt_timeout = plugin_get_interval () * 3 / 4; if (cdt_timeout < TIME_T_TO_CDTIME_T (2)) cdt_timeout = TIME_T_TO_CDTIME_T (2);