[zaptel-commits] tzafrir: branch 1.2 r4488 - /branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm

SVN commits to the Zaptel project zaptel-commits at lists.digium.com
Sun Aug 17 11:41:27 CDT 2008


Author: tzafrir
Date: Sun Aug 17 11:41:26 2008
New Revision: 4488

URL: http://svn.digium.com/view/zaptel?view=rev&rev=4488
Log:
Zaptel-perl: fix leftovers from r4475 (handling of spaces)

While r4767 solved some parsing problems of channels with "strange"
encoding names, it introduced a new problem (e.g.: "RED" after "(In
use)" which is fixed here.

Modified:
    branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm

Modified: branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm
URL: http://svn.digium.com/view/zaptel/branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm?view=diff&rev=4488&r1=4487&r2=4488
==============================================================================
--- branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm (original)
+++ branches/1.2/xpp/utils/zconf/Zaptel/Chans.pm Sun Aug 17 11:41:26 2008
@@ -104,23 +104,23 @@
 	my $info = '';
 	if(defined $rest) {
 		# remarks in parenthesis (In use), (no pcm)
-		while($rest =~ s/\s*(\([^)]+\))\s*//) {
+		while($rest =~ s/\s*(\([^)]+\))\s*/ /) {
 			$info .= " $1";
 		}
 		# Alarms
 		foreach my $alarm (@alarm_types) {
-			if($rest =~ s/\s*(\b${alarm}\b)\s*//) {
+			if($rest =~ s/\s*(\b${alarm}\b)\s*/ /) {
 				push(@alarms, $1);
 			}
 		}
 		foreach my $sig (@sigtypes) {
-			if($rest =~ s/^\Q$sig\E//) {
+			if($rest =~ s/^\Q$sig\E/ /) {
 				$signalling = $sig;
 				last;
 			}
 		}
 		warn "Unrecognized garbage '$rest' in $fqn\n"
-			if length($rest);
+			if $rest =~ /\S/;
 	}
 	$self->{NUM} = $num;
 	$self->{FQN} = $fqn;




More information about the zaptel-commits mailing list