counter values can be negative
authorivan <ivan>
Thu, 12 Aug 2010 22:25:39 +0000 (22:25 +0000)
committerivan <ivan>
Thu, 12 Aug 2010 22:25:39 +0000 (22:25 +0000)
httemplate/edit/process/svc_acct.cgi

index 0b272b5..ba21ab4 100755 (executable)
@@ -70,7 +70,7 @@ if ( $svcnum ) {
                grep { $new->$_ }
                qw( seconds upbytes downbytes totalbytes );
 
-    $error ||= "invalid $_" foreach grep { $hash{$_} !~ /^\d+$/ } keys %hash;
+    $error ||= "invalid $_" foreach grep { $hash{$_} !~ /^-?\d+$/ } keys %hash;
     $error ||= $new->set_usage(\%hash);  #unoverlimit and trigger radius changes
     last;                                #once is enough
   }