[svn-commits] tzafrir: branch tools/2.3 r8960 - in /tools/branches/2.3: ./ xpp/ xpp/perl_mo...

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Jul 21 07:07:24 CDT 2010


Author: tzafrir
Date: Wed Jul 21 07:07:20 2010
New Revision: 8960

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=8960
Log:
Allow using CONNECTOR/LABEL in genconf_parameters

Allow using CONNECTOR/LABEL in addition to SPAN and NUM for pri_termtype
in genconf_parameters

Merged revisions 8923 via svnmerge from 
http://svn.digium.com/svn/dahdi/tools/trunk

Modified:
    tools/branches/2.3/   (props changed)
    tools/branches/2.3/xpp/genconf_parameters
    tools/branches/2.3/xpp/perl_modules/Dahdi/Span.pm

Propchange: tools/branches/2.3/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Wed Jul 21 07:07:20 2010
@@ -1,1 +1,1 @@
-/tools/trunk:1-8509,8528-8529,8535,8580,8589,8630,8638,8741,8827,8854
+/tools/trunk:1-8509,8528-8529,8535,8580,8589,8630,8638,8741,8827,8854,8923

Modified: tools/branches/2.3/xpp/genconf_parameters
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.3/xpp/genconf_parameters?view=diff&rev=8960&r1=8959&r2=8960
==============================================================================
--- tools/branches/2.3/xpp/genconf_parameters (original)
+++ tools/branches/2.3/xpp/genconf_parameters Wed Jul 21 07:07:20 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/branches/2.3/xpp/perl_modules/Dahdi/Span.pm
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.3/xpp/perl_modules/Dahdi/Span.pm?view=diff&rev=8960&r1=8959&r2=8960
==============================================================================
--- tools/branches/2.3/xpp/perl_modules/Dahdi/Span.pm (original)
+++ tools/branches/2.3/xpp/perl_modules/Dahdi/Span.pm Wed Jul 21 07:07:20 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 svn-commits mailing list