diff options
author | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-10-18 18:04:12 +0000 |
---|---|---|
committer | tzafrir <tzafrir@5390a7c7-147a-4af0-8ec9-7488f05a26cb> | 2007-10-18 18:04:12 +0000 |
commit | 0ff2be2153962a28bb9ff142ee70e767a70c7117 (patch) | |
tree | 89bef4c7feb554ee9a3026e4629e4b0e9b4b1017 /xpp/utils/zconf/Zaptel | |
parent | 330fa69c63acebac9a8e8029438f8216de892169 (diff) |
* zaptel-perl should not panic when there is no /proc/bus/usb (Closes
#11020).
* Don't build metering by default for now.
* And this is xpp rev 4900.
git-svn-id: http://svn.digium.com/svn/zaptel/branches/1.2@3153 5390a7c7-147a-4af0-8ec9-7488f05a26cb
Diffstat (limited to 'xpp/utils/zconf/Zaptel')
-rw-r--r-- | xpp/utils/zconf/Zaptel/Hardware/USB.pm | 2 | ||||
-rw-r--r-- | xpp/utils/zconf/Zaptel/Xpp.pm | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/xpp/utils/zconf/Zaptel/Hardware/USB.pm b/xpp/utils/zconf/Zaptel/Hardware/USB.pm index 0f2024b..4d87536 100644 --- a/xpp/utils/zconf/Zaptel/Hardware/USB.pm +++ b/xpp/utils/zconf/Zaptel/Hardware/USB.pm @@ -85,6 +85,8 @@ sub devices($) { sub scan_devices($) { my $pack = shift || die; my $usb_device_list = "/proc/bus/usb/devices"; + return unless (-r $usb_device_list); + open(F, $usb_device_list) || die "Failed to open $usb_device_list: $!"; $/ = ''; while(<F>) { diff --git a/xpp/utils/zconf/Zaptel/Xpp.pm b/xpp/utils/zconf/Zaptel/Xpp.pm index db9add6..3c4b52c 100644 --- a/xpp/utils/zconf/Zaptel/Xpp.pm +++ b/xpp/utils/zconf/Zaptel/Xpp.pm @@ -79,7 +79,7 @@ sub sync { my $newapi = 0; my $file = "$proc_base/sync"; - die "$file is missing" unless -f $file; + return '' unless -f $file; # First query open(F, "$file") or die "Failed to open $file for reading: $!"; while(<F>) { |