From 9f422a1629f6b7214853b846b36790ae4e6d5b12 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Wed, 20 Aug 2008 12:01:50 +0200 Subject: [PATCH] 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 :( --- src/plugin.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 */ -- 2.11.0