From 24c0f390f907783b15e529e52723f09d4d930064 Mon Sep 17 00:00:00 2001 From: tzafrir Date: Mon, 8 Sep 2008 20:40:05 +0000 Subject: 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 --- kernel/xpp/utils/zconf/Zaptel/Chans.pm | 5 +++-- 1 file 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}; -- cgit v1.2.3