diff options
author | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-20 13:44:35 +0000 |
---|---|---|
committer | Tzafrir Cohen <tzafrir.cohen@xorcom.com> | 2009-04-20 13:44:35 +0000 |
commit | 072842446fd7d7c522706729c358d23c9aeeecd8 (patch) | |
tree | e855926f6053bac057f13362bcec8784eb4719f9 /xpp/dahdi_hardware | |
parent | 469e3f161db8d43374994ff4ad8a047669e3a96d (diff) |
xpp: twinstar-related perl improvements
* New generator Dahdi::Config::Gen::Xpporder can generate
and xpp_order config for an existing setup.
* Add more TwinStar related logic to Dahdi::Xpp::Mpp. Simplifies
the twinstar utility accordingly.
* twinstar_hook: for the multiple Astribanks case.
* twinstar_setup: More logic tests. Now delegates configuration
generation to dahdi_genconf (with new Xpporder generator).
* dahdi_hardware: Show number of channels with -v
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@6417 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/dahdi_hardware')
-rwxr-xr-x | xpp/dahdi_hardware | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xpp/dahdi_hardware b/xpp/dahdi_hardware index 2528fb7..867e897 100755 --- a/xpp/dahdi_hardware +++ b/xpp/dahdi_hardware @@ -37,6 +37,7 @@ sub show_xbus($) { printf " LABEL=%-20s CONNECTOR=%-20s\n", $label, $connector; foreach my $xpd (@xpds) { my $reg = $xpd->dahdi_registration; + my $channels = '(' . $xpd->channels . ')'; my $span; my $spanstr; if($reg && @spans) { @@ -48,7 +49,7 @@ sub show_xbus($) { my $master = ''; #$master = "XPP-SYNC" if $xpd->is_sync_master; $master .= " DAHDI-SYNC" if defined($span) && $span->is_dahdi_sync_master; - printf "\t%-10s: %-8s %s %s\n", $xpd->fqn, $xpd->type, $spanstr, $master; + printf "\t%-10s: %-8s %-5s %s %s\n", $xpd->fqn, $xpd->type, $channels, $spanstr, $master; } } @@ -75,7 +76,6 @@ sub show_disconnected(%) { Dahdi::Xpp::xbuses if ($opts{'v'}); my @devices = Dahdi::Hardware->device_list; -Dahdi::Xpp::Mpp->set_astribank_tool('./astribank_tool'); foreach my $dev (@devices) { my $driver = $dev->driver || ""; my $xbus; @@ -106,9 +106,9 @@ foreach my $dev (@devices) { } my $description = $dev->description || ""; printf $format, $dev->hardware_name, $driver, $dev->vendor, $dev->product, $description; - if($opts{'v'} && defined $mppinfo) { + if($opts{'v'} && defined $mppinfo && exists $mppinfo->{MPP_TALK}) { printf " MPP: TWINSTAR_PORT=$tws_port\n" if defined $tws_port; - printf " MPP: TWINSTAR_WATCHDOG=$tws_watchdog\n"; + printf " MPP: TWINSTAR_WATCHDOG=$tws_watchdog\n" if defined $tws_watchdog; for(my $i = 0; $i < 2; $i++) { printf " MPP: TWINSTAR_POWER[%d]=%d\n", $i, $tws_power->[$i] if defined $tws_power; |