summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-09-08 20:34:10 +0000
committertzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb>2008-09-08 20:34:10 +0000
commit71df84d2d609146c6298745dc250cf7b56002520 (patch)
tree04d0950b0b5a95a1e2709ac755980236ec00cbde
parent7c29ac71b777592bbb5ae0d85f12edfe130aa9d7 (diff)
Minor FXS/FXO type fixes in case probe was not done.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@4512 5390a7c7-147a-4af0-8ec9-7488f05a26cb
-rw-r--r--xpp/utils/zconf/Zaptel/Chans.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/xpp/utils/zconf/Zaptel/Chans.pm b/xpp/utils/zconf/Zaptel/Chans.pm
index cb0fb94..53ed277 100644
--- a/xpp/utils/zconf/Zaptel/Chans.pm
+++ b/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};