[dahdi-commits] tzafrir: tools/trunk r8923 - in /tools/trunk/xpp: ./ perl_modules/Dahdi/
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Wed Jul 14 05:45:58 CDT 2010
Author: tzafrir
Date: Wed Jul 14 05:45:55 2010
New Revision: 8923
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8923
Log:
Allow using CONNECTOR/LABEL in genconf_parameters
Allow using CONNECTOR/LABEL in addition to SPAN and NUM for pri_termtype
in genconf_parameters
Modified:
tools/trunk/xpp/genconf_parameters
tools/trunk/xpp/perl_modules/Dahdi/Span.pm
Modified: tools/trunk/xpp/genconf_parameters
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/genconf_parameters?view=diff&rev=8923&r1=8922&r2=8923
==============================================================================
--- tools/trunk/xpp/genconf_parameters (original)
+++ tools/trunk/xpp/genconf_parameters Wed Jul 14 05:45:55 2010
@@ -147,3 +147,23 @@
#pri_termtype
# SPAN/* NT
#
+# Astribanks can be matched by span and also by their:
+# LABEL + XPD number:
+# this is burned into the Astribank and won't change
+# if it's connected via different USB port/hub
+# CONNECTOR + XPD number:
+# The USB path to which the Astribank is connected.
+# Replacing an Astribank and connecting to the same USB port/hub
+# would not change this property. However, any change in USB
+# wiring (e.g: adding another hub) may alter this.
+# NUM (XBUS number) + XPD number:
+# The XBUS number. This is not stable and may even change
+# between boots.
+#
+#pri_termtype
+# LABEL/usb:INT01216/XPD-0[123] NT
+# LABEL/usb:INT00375/XPD-0[123] NT
+# CONNECTOR/@usb-0000:00:1d.7-1/XPD-0[123] NT
+# CONNECTOR/@usb-0000:00:1d.7-2/XPD-0[123] NT
+# NUM/XBUS-01/XPD-0[123] NT
+# NUM/XBUS-03/XPD-0[123] NT
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=8923&r1=8922&r2=8923
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Span.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Span.pm Wed Jul 14 05:45:55 2010
@@ -323,10 +323,17 @@
}
push(@pri_specs , 'SPAN/* TE'); # Default
my @patlist = ( "SPAN/" . $span->num );
- my ($xbus_name, $xpd_name) = ($name =~ m|(XBUS-\d+)/(XPD-\d+)|);
- if(defined $xbus_name) {
+ my $xpd = $span->{XPD};
+ if(defined $xpd) {
+ my $xbus = $xpd->xbus;
+ my $xbus_name = $xbus->name;
+ my $xpd_name = "XPD-" . $xpd->id;
+ my $label = $xbus->label;
+ my $connector = $xbus->connector;
+ #print "DEBUG: '$xbus_name/$xpd_name' LABEL='$label' CONNECTOR='$connector'\n";
push(@patlist, "NUM/$xbus_name/$xpd_name");
-# push(@patlist, "CONNECTOR/$ENV{XBUS_CONNECTOR}/$xpd_name");
+ push(@patlist, "LABEL/$label/$xpd_name");
+ push(@patlist, "CONNECTOR/$connector/$xpd_name");
}
#print STDERR "PATLIST=@patlist\n";
my $match_termtype;
@@ -343,7 +350,7 @@
foreach my $pattern (@patlist) {
#print STDERR "testmatch: $pattern =~ $match\n";
if($pattern =~ $match) {
- #print STDERR "$xpd_name: MATCH '$pattern' ~ '$match' termtype=$termtype\n";
+ #print STDERR "MATCH '$pattern' ~ '$match' termtype=$termtype\n";
$match_termtype = $termtype;
last SPEC;
}
More information about the dahdi-commits
mailing list