From 4eb7c55b89987c494b2113f6da8653db77ef26b8 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 17 Aug 2008 15:50:00 +0000 Subject: 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. git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@4787 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/perl_modules/Dahdi/Chans.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xpp/perl_modules/Dahdi/Chans.pm') diff --git a/xpp/perl_modules/Dahdi/Chans.pm b/xpp/perl_modules/Dahdi/Chans.pm index b7e54cc..4859aa0 100644 --- a/xpp/perl_modules/Dahdi/Chans.pm +++ b/xpp/perl_modules/Dahdi/Chans.pm @@ -105,23 +105,23 @@ sub new($$$$$$) { 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; -- cgit v1.2.3