From 2648e102fdcbc1c5ba71beefd6ed4db4ec1a86cc Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 27 Sep 2007 16:12:44 +0000 Subject: [PATCH] snmp plugin: Improved the error messages in the init code. --- src/snmp.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/snmp.c b/src/snmp.c index 5cc1b2d9..3c8a4fcb 100644 --- a/src/snmp.c +++ b/src/snmp.c @@ -1183,7 +1183,10 @@ static int csnmp_init (void) int i; if (host_head == NULL) + { + NOTICE ("snmp plugin: No host has been defined."); return (-1); + } call_snmp_init_once (); @@ -1218,7 +1221,10 @@ static int csnmp_init (void) threads = (pthread_t *) malloc (threads_num * sizeof (pthread_t)); if (threads == NULL) + { + ERROR ("snmp plugin: malloc failed."); return (-1); + } memset (threads, '\0', threads_num * sizeof (pthread_t)); for (i = 0; i < threads_num; i++) -- 2.11.0