]> git.etc.gen.nz Git - spong.git/commitdiff
fixed problem of $_ not being assigned in while( shift... loop
authorStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Jan 2002 15:08:07 +0000 (15:08 +0000)
committerStephen L Johnson <sjohnson@monsters.org>
Tue, 22 Jan 2002 15:08:07 +0000 (15:08 +0000)
src/lib/Spong/Client/plugins/check_mailq

index 2876f4883150375812d8cd7faa72a14047a7e72c..b5dbf2481069e63cf3f6214c4b9299e0402f57d7 100755 (executable)
@@ -4,7 +4,7 @@ $CHECKFUNCS{'mailq'} = \&check_mailq;
 # Sendmail mailq check for mail servers. If checks the numeber of mail
 # message queue against the $MAILQWARN AND $MAILQCRIT variables
 
-# $Id: check_mailq,v 1.4 2001/09/16 18:08:39 sljohnson Exp $
+# $Id: check_mailq,v 1.5 2002/01/22 15:08:07 sljohnson Exp $
 
 use Spong::SafeExec qw(safe_exec);
 
@@ -17,7 +17,7 @@ sub check_mailq {
    $singlq = 0;
    my @msg = safe_exec($MAILQ);
    $mqcnt = 0;
-   while (shift @msg) {
+   while ($_ = shift @msg) {
        if (/Mail Queue\s+\((\d+)/) { $mqcnt = $1; $singleq=1;  }
        elsif (/Total Requests:\s+(\d+)/) { $mqcnt = $1; }
        elsif (/\s+(\S+)\s+\((\d+)\s+requests\)/) { $qcnt{$1} = $2; }