diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-09-08 20:40:05 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2008-09-08 20:40:05 +0000 |
commit | 24c0f390f907783b15e529e52723f09d4d930064 (patch) | |
tree | 563a0530d53b0dd0db4bef4b24eb0ab6a1b782d0 | |
parent | 44d3c90d25a9e68b4966d582c3e3fba7e261c445 (diff) |
Minor FXS/FXO type fixes in case probe was not done.
Merged revisions 4512 via svnmerge from
http://svn.digium.com/svn/zaptel/branches/1.2
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.4@4514 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r-- | kernel/xpp/utils/zconf/Zaptel/Chans.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/xpp/utils/zconf/Zaptel/Chans.pm b/kernel/xpp/utils/zconf/Zaptel/Chans.pm index cb0fb94..53ed277 100644 --- a/kernel/xpp/utils/zconf/Zaptel/Chans.pm +++ b/kernel/xpp/utils/zconf/Zaptel/Chans.pm @@ -157,8 +157,8 @@ sub new($$$$$$) { # Junghanns GSM card $type = "GSM"; } elsif(defined $signalling) { - $type = 'FXS' if $signalling =~ /^FXS/; - $type = 'FXO' if $signalling =~ /^FXO/; + $type = 'FXO' if $signalling =~ /^FXS/; + $type = 'FXS' if $signalling =~ /^FXO/; } else { $type = undef; } @@ -216,6 +216,7 @@ sub battery($) { my $self = shift or die; my $span = $self->span or die; + return undef if (not defined $self->type); return undef unless $self->type eq 'FXO'; return $self->{BATTERY} if defined $self->{BATTERY}; |