[Asterisk-cvs] astcc astcc-admin.cgi,1.9,1.10

russell at lists.digium.com russell at lists.digium.com
Wed Sep 29 21:06:19 CDT 2004


Update of /usr/cvsroot/astcc
In directory mongoose.digium.com:/tmp/cvs-serv17435

Modified Files:
	astcc-admin.cgi 
Log Message:
fix endless loop when starting digit is set to zero (bug 2545)


Index: astcc-admin.cgi
===================================================================
RCS file: /usr/cvsroot/astcc/astcc-admin.cgi,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- astcc-admin.cgi	26 Sep 2004 18:02:48 -0000	1.9
+++ astcc-admin.cgi	30 Sep 2004 01:08:38 -0000	1.10
@@ -174,7 +174,7 @@
 	my $number;
 	for (;;) {
 		$number = int(rand() * 9000 + 1000) . int(rand() * 9000 + 1000) . int(rand() * 9000 + 1000) . int(rand() * 9000 + 1000) . int(rand() * 9000 + 1000);
-		if ($config{'startingdigit'} ne "" ) {
+		if ($config{'startingdigit'} ne "" && $config{'startingdigit'} ne "0") {
 			$startingdigit = substr($number, 0, 1);	
 			if ($startingdigit == $config{'startingdigit'}) {
 				$number = substr($number, 0, $config{'cardlength'});			




More information about the svn-commits mailing list