Author: sparky
Date: Fri Oct  9 23:21:38 2009
New Revision: 10744

Modified:
   toys/rsget.pl/RSGet/Dispatch.pm
Log:
- better get_slots


Modified: toys/rsget.pl/RSGet/Dispatch.pm
==============================================================================
--- toys/rsget.pl/RSGet/Dispatch.pm     (original)
+++ toys/rsget.pl/RSGet/Dispatch.pm     Fri Oct  9 23:21:38 2009
@@ -111,10 +111,14 @@
 {
        my $cmd = shift;
        my $suggested = shift;
-       return setting( "max_slots" ) if $cmd eq "check";
+       my $max = setting( "max_slots" );
+       return $max if $cmd eq "check";
        return 1 unless defined $suggested;
-       return 0 + $suggested if $suggested =~ /^\d+$/;
-       return setting( "max_slots" ) if lc $suggested eq "max";
+       if ( $suggested =~ /^\d+$/ ) {
+               return $max if $max < $suggested;
+               return 0 | $suggested;
+       }
+       return $max if lc $suggested eq "max";
        warn "Invalid slots declaration: $suggested\n" if verbose( 1 );
        return 1;
 }
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to