]> git.zerfleddert.de Git - upsgraph/commitdiff
return undef if initiating snmp session fails
authorSimon Kuhnle <simon@blarzwurst.de>
Thu, 23 Sep 2010 20:44:49 +0000 (22:44 +0200)
committerMichael Gernoth <michael@gernoth.net>
Thu, 23 Sep 2010 20:51:03 +0000 (22:51 +0200)
upsgraph.pl

index 100c52b1f38c1a2ec2274ede6c4b6000cff672d2..9887d0c4ab2215e9b20eaecd4abf0cc23de55292 100755 (executable)
@@ -58,6 +58,7 @@ sub fetch_snmp(@) {
 
        if (!$session) {
                print STDERR "session error: $error";
 
        if (!$session) {
                print STDERR "session error: $error";
+               return undef;
        }
 
        $session->translate(0);
        }
 
        $session->translate(0);
Impressum, Datenschutz