fix registration order for more than 9 Astribanks
authorTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 23 Jun 2011 17:33:43 +0000 (17:33 +0000)
committerTzafrir Cohen <tzafrir.cohen@xorcom.com>
Thu, 23 Jun 2011 17:33:43 +0000 (17:33 +0000)
The sorting function for SORT_XPPORDER accidentally sorted the Astribank
priorities from the xpp_order file (/etc/dahdi/xpp_order) lexicographically
instead of numerically, that is: 10 before 2.

Signed-off-by: Tzafrir Cohen <tzafrir.cohen@xorcom.com>

git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@9986 17933a7a-c749-41c5-a318-cba88f637d49

xpp/perl_modules/Dahdi/Xpp.pm

index d4b315b..8280b5e 100644 (file)
@@ -97,7 +97,7 @@ sub by_type {
 }
 
 sub by_xpporder {
-       my $cmp = $a->xpporder cmp $b->xpporder;
+       my $cmp = $a->xpporder <=> $b->xpporder;
        return $cmp if $cmp != 0;
        return $a->connector cmp $b->connector;
 }