[svn-commits] tzafrir: tools/trunk r4787 - /tools/trunk/xpp/perl_modules/Dahdi/Chans.pm

SVN commits to the Digium repositories svn-commits at lists.digium.com
Sun Aug 17 10:50:01 CDT 2008


Author: tzafrir
Date: Sun Aug 17 10:50:00 2008
New Revision: 4787

URL: http://svn.digium.com/view/dahdi?view=rev&rev=4787
Log:
Dahdi::Chans: fix leftovers from r4767 (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:
    tools/trunk/xpp/perl_modules/Dahdi/Chans.pm

Modified: tools/trunk/xpp/perl_modules/Dahdi/Chans.pm
URL: http://svn.digium.com/view/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Chans.pm?view=diff&rev=4787&r1=4786&r2=4787
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Chans.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Chans.pm Sun Aug 17 10:50:00 2008
@@ -105,23 +105,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 svn-commits mailing list