From: Simon Kuhnle Date: Thu, 23 Sep 2010 20:44:49 +0000 (+0200) Subject: return undef if initiating snmp session fails X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/upsgraph/commitdiff_plain/e0acc35a4f60d2641e71593713acfb32cafef751?hp=0e74e3d8b878f134b1b4cd1f207c1765482a97e5 return undef if initiating snmp session fails --- diff --git a/upsgraph.pl b/upsgraph.pl index 100c52b..9887d0c 100755 --- a/upsgraph.pl +++ b/upsgraph.pl @@ -58,6 +58,7 @@ sub fetch_snmp(@) { if (!$session) { print STDERR "session error: $error"; + return undef; } $session->translate(0);