projects
/
collectd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b7a5d1d
)
snmp plugin: Improved the error messages in the init code.
author
Florian Forster
<octo@noris.net>
Thu, 27 Sep 2007 16:12:44 +0000
(16:12 +0000)
committer
Florian Forster
<octo@noris.net>
Thu, 27 Sep 2007 16:14:50 +0000
(16:14 +0000)
src/snmp.c
patch
|
blob
|
history
diff --git
a/src/snmp.c
b/src/snmp.c
index
5cc1b2d
..
3c8a4fc
100644
(file)
--- 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++)