diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-08-17 16:41:26 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-08-17 16:41:26 +0000 |
commit | 08c5fc1d4f76bdeea1e9088e01770ad83a295f4b (patch) | |
tree | 87fc3155a274b248f1d4975a4ac6df438c62c7bc | |
parent | 9d2e971977fa9d6f0607dbaac074c096f3321c41 (diff) |
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.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4488 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | xpp/utils/zconf/Zaptel/Chans.pm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xpp/utils/zconf/Zaptel/Chans.pm b/xpp/utils/zconf/Zaptel/Chans.pm index 38e8a4b..cb0fb94 100644 --- a/xpp/utils/zconf/Zaptel/Chans.pm +++ b/xpp/utils/zconf/Zaptel/Chans.pm @@ -104,23 +104,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; |