From cbf7250b4113c9058654d91b6199814741a06ca9 Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Sat, 23 Feb 2008 10:56:37 +0100 Subject: [PATCH] ping plugin: Deactivate the plugin if (pingobj == NULL). If (pingobj == NULL), then the init-function will return (-1) so that the plugin is deactivated. --- src/ping.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/ping.c b/src/ping.c index 27a65faa..05f660b3 100644 --- a/src/ping.c +++ b/src/ping.c @@ -106,15 +106,18 @@ static void add_hosts (void) hl_this = hl_this->next; } } -} +} /* void add_hosts */ static int ping_init (void) { + if (pingobj == NULL) + return (-1); + if (hosts != NULL) add_hosts (); return (0); -} +} /* int ping_init */ static int ping_config (const char *key, const char *value) { -- 2.30.2