From ecfcc3545cd8326eec46eb5fcbc1a8364238d8b2 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Sun, 16 Aug 2009 15:09:56 +0000 Subject: xpp: Dahdi::Hardware->rescan() - refresh hardware list Allow refreshing the list of hardware even after the initial scan. (E.g. a script that resets firmware for Astribanks) xpp rev: 7320 git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@7012 a0bf4364-ded3-4de4-8d8a-66a801d63aff --- xpp/perl_modules/Dahdi/Hardware.pm | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xpp/perl_modules/Dahdi/Hardware.pm b/xpp/perl_modules/Dahdi/Hardware.pm index 1509615..ba89447 100644 --- a/xpp/perl_modules/Dahdi/Hardware.pm +++ b/xpp/perl_modules/Dahdi/Hardware.pm @@ -183,6 +183,20 @@ sub scan($) { } } +=head1 rescan + +Rescan for devices. In case new devices became available since the script +has started. + +=cut + +sub rescan($) { + my $pack = shift || die; + + $hardware_scanned = 0; + $pack->scan(); +} + sub import { Dahdi::Hardware->scan unless grep(/\bnoscan\b/i, @_); } -- cgit v1.2.3