X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fmemcachec.c;h=7c8528d500492751cd035f580000a487f42d3cb6;hb=82e27678f8972d2625b466e7e7ba9daaa6395c98;hp=d066501cdcba73afb56363dae167b9dd78353e10;hpb=171d6a4bd5e05b56be83860701d35bfe1373d6a7;p=collectd.git diff --git a/src/memcachec.c b/src/memcachec.c index d066501c..7c8528d5 100644 --- a/src/memcachec.c +++ b/src/memcachec.c @@ -328,7 +328,7 @@ static int cmc_config_add_page (oconfig_item_t *ci) /* {{{ */ if (strcasecmp ("Server", child->key) == 0) status = cmc_config_add_string ("Server", &page->server, child); - if (strcasecmp ("Key", child->key) == 0) + else if (strcasecmp ("Key", child->key) == 0) status = cmc_config_add_string ("Key", &page->key, child); else if (strcasecmp ("Match", child->key) == 0) /* Be liberal with failing matches => don't set `status'. */ @@ -452,7 +452,6 @@ static void cmc_submit (const web_page_t *wp, const web_match_t *wm, /* {{{ */ vl.values = values; vl.values_len = 1; - vl.time = time (NULL); sstrncpy (vl.host, hostname_g, sizeof (vl.host)); sstrncpy (vl.plugin, "memcachec", sizeof (vl.plugin)); sstrncpy (vl.plugin_instance, wp->instance, sizeof (vl.plugin_instance)); @@ -501,6 +500,7 @@ static int cmc_read_page (web_page_t *wp) /* {{{ */ } cmc_submit (wp, wm, mv); + match_value_reset (mv); } /* for (wm = wp->matches; wm != NULL; wm = wm->next) */ sfree (wp->buffer);