[dahdi-commits] tzafrir: branch tools/2.2 r7827 - in /tools/branches/2.2: ./ xpp/perl_modules...
SVN commits to the DAHDI project
dahdi-commits at lists.digium.com
Sun Jan 10 09:15:14 CST 2010
Author: tzafrir
Date: Sun Jan 10 09:15:09 2010
New Revision: 7827
URL: http://svnview.digium.com/svn/dahdi?view=rev&rev=7827
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.
(closes issue #16552)
Merged revisions 7558 via svnmerge from
https://origsvn.digium.com/svn/dahdi/tools/trunk
Modified:
tools/branches/2.2/ (props changed)
tools/branches/2.2/xpp/perl_modules/Dahdi/Hardware/USB.pm
Propchange: tools/branches/2.2/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Sun Jan 10 09:15:09 2010
@@ -1,1 +1,1 @@
-/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6886,6889-6982,6985-6998,7000-7011,7013-7042,7044,7046-7131,7133,7135-7136,7139-7217,7219-7255,7257-7332,7334-7460,7462-7476,7596,7609,7752,7792
+/tools/trunk:1-6678,6823,6829-6830,6832-6833,6835,6837-6886,6889-6982,6985-6998,7000-7011,7013-7042,7044,7046-7131,7133,7135-7136,7139-7217,7219-7255,7257-7332,7334-7460,7462-7476,7558,7596,7609,7752,7792
Modified: tools/branches/2.2/xpp/perl_modules/Dahdi/Hardware/USB.pm
URL: http://svnview.digium.com/svn/dahdi/tools/branches/2.2/xpp/perl_modules/Dahdi/Hardware/USB.pm?view=diff&rev=7827&r1=7826&r2=7827
==============================================================================
--- tools/branches/2.2/xpp/perl_modules/Dahdi/Hardware/USB.pm (original)
+++ tools/branches/2.2/xpp/perl_modules/Dahdi/Hardware/USB.pm Sun Jan 10 09:15:09 2010
@@ -132,13 +132,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 $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 $model = $usb_ids{"$vendor:$product"};
- next unless defined $model;
my $d = Dahdi::Hardware::USB->new(
IS_ASTRIBANK => ($model->{DRIVER} eq 'xpp_usb')?1:0,
PRIV_DEVICE_NAME => $devname,
More information about the dahdi-commits
mailing list