add error when SNMP does not respond to plugin.

git-svn-id: http://svn.centreon.com/trunk/plugins-2.x@11112 6bcd3966-0018-0410-8128-fd23d134de7e
This commit is contained in:
Julien Mathis 2010-11-25 15:52:28 +00:00
parent bfcc0a827e
commit 2922782c2f
1 changed files with 5 additions and 0 deletions

View File

@ -254,6 +254,11 @@ if ($mustCreateFile) {
print FILE $interfaceIndex.";".$result->{$key}."\n";
}
close(FILE);
} else {
if (!$result) {
printf("ERROR: Cannot get SNMP info : %s", $session->error);
exit $ERRORS{'UNKNOWN'};
}
}
}