summaryrefslogtreecommitdiff
path: root/xpp/xpp_sync
diff options
context:
space:
mode:
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-18 10:22:27 +0000
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>2009-01-18 10:22:27 +0000
commite45d247d903f548a7aa927b9d13244f3f972dd21 (patch)
tree4c22e56694d71f8da9b9f4bbd9a21127c82c885e /xpp/xpp_sync
parentd1679d45cd5664b707ece84431ca1d20f5637180 (diff)
XPP tool updates to match r5663: sysfs migration.
git-svn-id: http://svn.asterisk.org/svn/dahdi/tools/trunk@5671 a0bf4364-ded3-4de4-8d8a-66a801d63aff
Diffstat (limited to 'xpp/xpp_sync')
-rwxr-xr-xxpp/xpp_sync22
1 files changed, 5 insertions, 17 deletions
diff --git a/xpp/xpp_sync b/xpp/xpp_sync
index 17521ba..b7c723a 100755
--- a/xpp/xpp_sync
+++ b/xpp/xpp_sync
@@ -51,21 +51,9 @@ sub get_sorted_xpds() {
push(@good_xpds, $xpd);
}
}
- my @pri_nt_xpds = grep { $_->type =~ /(E1|T1|J1)_NT/; } @good_xpds;
- my @pri_te_xpds = grep { $_->type =~ /(E1|T1|J1)_TE/; } @good_xpds;
- my @bri_nt_xpds = grep { $_->type eq 'BRI_NT'; } @good_xpds;
- my @bri_te_xpds = grep { $_->type eq 'BRI_TE'; } @good_xpds;
- my @fxo_xpds = grep { $_->type eq 'FXO'; } @good_xpds;
- my @fxs_xpds = grep { $_->type eq 'FXS'; } @good_xpds;
-
- # Sync Priority
- return
- @pri_nt_xpds,
- @bri_nt_xpds,
- @fxo_xpds,
- @pri_te_xpds,
- @bri_te_xpds,
- @fxs_xpds;
+ my @xpd_prio = Dahdi::Xpp::Xpd::xpds_by_rank(@good_xpds);
+ #Dahdi::Xpp::Xpd::show_xpd_rank(@xpd_prio);
+ return @good_xpds;
}
sub do_select(@) {
@@ -108,7 +96,7 @@ sub show_sync() {
my $xpdstr = '[ ' . $xbus->pretty_xpds . ' ]';
my $label = '[' . $xbus->label() . ']';
my $connector = '(' . $xbus->connector . ')';
- my $mark = ($curr_sync =~ /\d+/ and $xbus->num == $curr_sync)?"+":"";
+ my $mark = ($curr_sync =~ /^\d+$/ and $xbus->num == $curr_sync)?"+":"";
my $padding = ' ' x (40 - length $xpdstr);
printf " %1s %s %-25s %-14s %s\n", $mark, $xbus->name, $connector, $label, $xpdstr;
}
@@ -131,7 +119,7 @@ END
}
}
-if($sync) {
+if(defined $sync) {
if($autoselect) {
do_select(@sync_xpds);
} else {