From 5072f0383c9b6cee279c27cc2cfbe58a819a70e1 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Sun, 17 Aug 2008 17:08:21 +0000 Subject: Zaptel-perl: fix leftovers from r4475 (handling of spaces) While r4476 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. Merged revisions 4488 via svnmerge from http://svn.digium.com/svn/zaptel/branches/1.2 git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4489 5390a7c7-147a-4af0-8ec9-7488f05a26cb --- kernel/xpp/utils/zconf/Zaptel/Chans.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kernel/xpp') diff --git a/kernel/xpp/utils/zconf/Zaptel/Chans.pm b/kernel/xpp/utils/zconf/Zaptel/Chans.pm index 38e8a4b..cb0fb94 100644 --- a/kernel/xpp/utils/zconf/Zaptel/Chans.pm +++ b/kernel/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; -- cgit v1.2.3