From: Florian Forster Date: Thu, 27 Sep 2007 16:12:44 +0000 (+0000) Subject: snmp plugin: Improved the error messages in the init code. X-Git-Tag: collectd-4.1.2~2^2 X-Git-Url: https://git.octo.it/?a=commitdiff_plain;ds=sidebyside;h=2648e102fdcbc1c5ba71beefd6ed4db4ec1a86cc;p=collectd.git snmp plugin: Improved the error messages in the init code. --- 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++)