[dahdi-commits] sruffell: tools/trunk r10213 - /tools/trunk/xpp/perl_modules/Dahdi/Span.pm

SVN commits to the DAHDI project dahdi-commits at lists.digium.com
Thu Sep 29 12:00:50 CDT 2011


Author: sruffell
Date: Thu Sep 29 12:00:46 2011
New Revision: 10213

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=10213
Log:
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 at digium.com>
Tested-by: David Purdue <support at noojee.com.au>

Modified:
    tools/trunk/xpp/perl_modules/Dahdi/Span.pm

Modified: tools/trunk/xpp/perl_modules/Dahdi/Span.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Span.pm?view=diff&rev=10213&r1=10212&r2=10213
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Span.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Span.pm Thu Sep 29 12:00:46 2011
@@ -191,6 +191,7 @@
 	$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 @@
 			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;




More information about the dahdi-commits mailing list