[svn-commits] tzafrir: tools/trunk r7558 - /tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm

SVN commits to the Digium repositories svn-commits at lists.digium.com
Wed Nov 11 04:32:03 CST 2009


Author: tzafrir
Date: Wed Nov 11 04:31:59 2009
New Revision: 7558

URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7558
Log:
dahdi-perl: only get 'serial' and 'devnum' attributes from Astribanks

We can tell if a device is an Astribank by the vendorId and productId
attribute. Get other attributed only after we give up on other devices.

Modified:
    tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm

Modified: tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm
URL: http://svnview.digium.com/svn/dahdi/tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm?view=diff&rev=7558&r1=7557&r2=7558
==============================================================================
--- tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm (original)
+++ tools/trunk/xpp/perl_modules/Dahdi/Hardware/USB.pm Wed Nov 11 04:31:59 2009
@@ -131,13 +131,13 @@
 		# busnum:
 		m|/(\d+)-\d+$|;
 		my $busnum = $1 || next;
-		my $devnum = _get_attr("$_/devnum");
 		my $vendor = _get_attr("$_/idVendor");
 		my $product = _get_attr("$_/idProduct");
-		my $serial = _get_attr("$_/serial") or return undef;
-		my $devname = sprintf("%03d/%03d", $busnum, $devnum);
 		my $model = $usb_ids{"$vendor:$product"};
 		next unless defined $model;
+		my $devnum = _get_attr("$_/devnum");
+		my $serial = _get_attr("$_/serial");
+		my $devname = sprintf("%03d/%03d", $busnum, $devnum);
 		my $d = Dahdi::Hardware::USB->new(
 			IS_ASTRIBANK		=> ($model->{DRIVER} eq 'xpp_usb')?1:0,
 			PRIV_DEVICE_NAME	=> $devname,




More information about the svn-commits mailing list