From: Florian Forster Date: Wed, 20 Aug 2008 10:01:50 +0000 (+0200) Subject: src/plugin.c: Fix an endless loop in `plugin_flush'. X-Git-Tag: collectd-4.5.0~65 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=9f422a1629f6b7214853b846b36790ae4e6d5b12;p=collectd.git src/plugin.c: Fix an endless loop in `plugin_flush'. Since this function is most often called from the unixsock plugin, which creates a separate thread for handling connections, this did not effect the rest of the daemon and was kind of tricky to track down. :/ What a stupid mistake :( --- diff --git a/src/plugin.c b/src/plugin.c index bf8fb085..cedd8b0f 100644 --- a/src/plugin.c +++ b/src/plugin.c @@ -715,12 +715,15 @@ int plugin_flush (const char *plugin, int timeout, const char *identifier) { if ((plugin != NULL) && (strcmp (plugin, le->key) != 0)) + { + le = le->next; continue; + } callback = (int (*) (int, const char *)) le->value; - le = le->next; - (*callback) (timeout, identifier); + + le = le->next; } return (0); } /* int plugin_flush */