diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-08-17 15:50:00 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2008-08-17 15:50:00 +0000 |
commit | 4eb7c55b89987c494b2113f6da8653db77ef26b8 (patch) | |
tree | c53161b6f2777960c9856506138cf5e189e3a22e /xpp/perl_modules/Dahdi/Chans.pm | |
parent | c3b406cc3fd13be93d935a3ac2f5c37dbb05f8e5 (diff) |
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
Diffstat (limited to 'xpp/perl_modules/Dahdi/Chans.pm')
-rw-r--r-- | xpp/perl_modules/Dahdi/Chans.pm | 8 |
1 files changed, 4 insertions, 4 deletions
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; |