summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-01-10 15:15:09 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2010-01-10 15:15:09 +0000
commit60bc4492d70e5f0e2cedfa1835a80be1ec036206 (patch)
tree472406c37dda77cf5992ca4f040465b72272f69b
parent7fc953834fc94c2283ab9f4110048c8754382ef6 (diff)
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 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/branches/2.2@7827 a0bf4364-ded3-4de4-8d8a-66a801d63aff
-rw-r--r--xpp/perl_modules/Dahdi/Hardware/USB.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/xpp/perl_modules/Dahdi/Hardware/USB.pm b/xpp/perl_modules/Dahdi/Hardware/USB.pm
index ae1bf93..3eb9fe6 100644
--- a/xpp/perl_modules/Dahdi/Hardware/USB.pm
+++ b/xpp/perl_modules/Dahdi/Hardware/USB.pm
@@ -132,13 +132,13 @@ sub scan_devices_sysfs($) {
# 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");
- 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,