diff options
author | Shaun Ruffell <sruffell@digium.com> | 2011-10-21 22:12:45 +0000 |
---|---|---|
committer | Shaun Ruffell <sruffell@digium.com> | 2011-10-21 22:12:45 +0000 |
commit | d6809d60f504a7c93c995156a7861e8b0749df49 (patch) | |
tree | bac2228830120a29245c02bc71a2b6b2b2f12270 | |
parent | 51008188155c3d617da65beb45915343ea83217f (diff) |
dahdi_genconf: Assume spans with unknown term types are software selectable.
Resolves a regression on the 2.5 branch that would result in:
$ dahdi_genconf
dahdi_genconf: missing default group (termtype=UNKNOWN)
E1 / T1 spans use software configuration to set CPE / NET mode. This
patch will just assume that a termtype is software selectable if it was
"UNKNOWN" when first scanning the span.
Internal-Issue-ID: DAHTOOL-55
Signed-off-by: Shaun Ruffell <sruffell@digium.com>
Tested-by: David Purdue <support@noojee.com.au>
Origin: http://svnview.digium.com/svn/dahdi?view=rev&rev=10213
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.5@10255 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r-- | xpp/perl_modules/Dahdi/Span.pm | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xpp/perl_modules/Dahdi/Span.pm b/xpp/perl_modules/Dahdi/Span.pm index cf38c80..beea6af 100644 --- a/xpp/perl_modules/Dahdi/Span.pm +++ b/xpp/perl_modules/Dahdi/Span.pm @@ -191,6 +191,7 @@ sub new($$) { $self->{IS_DIGITAL} = 0; $self->{IS_BRI} = 0; $self->{IS_PRI} = 0; + $self->{TERMTYPE} = "UNKNOWN"; foreach my $cardtype (@bri_strings) { if($head =~ m/$cardtype/) { my $termtype = $1; @@ -230,6 +231,11 @@ sub new($$) { last; } } + + if (($self->is_soft_term_type == 0) and ($self->termtype eq "UNKNOWN")) { + $self->{IS_SOFT_TERM_TYPE} = 1; + } + ($self->{NAME}, $self->{DESCRIPTION}) = (split(/\s+/, $head, 4))[2, 3]; $self->{IS_DAHDI_SYNC_MASTER} = ($self->{DESCRIPTION} =~ /\(MASTER\)/) ? 1 : 0; |