Browse Source

dahdi_perl: fix regression with an AB with no modules

Fixes a regression introduced in
3572bb5a13 (before 2.7.0) - most of the
dahdi_perl tools will fail for an Astribank with no modules claiming
"No XPDs for '/sys/bus/astribanks/devices/xbus-00'"

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>
master
Tzafrir Cohen 8 years ago
parent
commit
b8d1e467e4
  1. 4
      xpp/perl_modules/Dahdi/Xpp/Xbus.pm

4
xpp/perl_modules/Dahdi/Xpp/Xbus.pm

@ -110,9 +110,7 @@ sub read_xpdnames($) {
sub read_num($) {
my $self = shift or die;
my $xbus_dir = $self->sysfs_dir;
my @xpdnames = read_xpdnames($xbus_dir);
my $first = shift @xpdnames or die "No XPDs for '$xbus_dir'\n";
$first =~ /^(\d+\d+).*/;
$xbus_dir =~ /.*-(\d\d)$/;
return $1;
}

Loading…
Cancel
Save