[Pkg-voip-commits] [dahdi-tools] 63/285: xpp: xpp_fxloader: regressions from r10348

tzafrir at debian.org tzafrir at debian.org
Thu Jul 7 19:18:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

tzafrir pushed a commit to branch master
in repository dahdi-tools.

commit 32b715d3739973d49776980dd6d6e855b7778fe8
Author: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
Date:   Sun Dec 4 15:33:21 2011 +0000

    xpp: xpp_fxloader: regressions from r10348
    
    * Avoid a duplicated run of udev on some systems.
    * Fix usage of astribank_tool's output.
    
    Signed-off-by: Tzafrir Cohen <tzafrir.cohen at xorcom.com>
    
    git-svn-id: http://svn.astersk.org/svn/dahdi/tools/trunk@10366 17933a7a-c749-41c5-a318-cba88f637d49
---
 xpp/xpp_fxloader | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/xpp/xpp_fxloader b/xpp/xpp_fxloader
index 49a8cd4..e0a7731 100644
--- a/xpp/xpp_fxloader
+++ b/xpp/xpp_fxloader
@@ -278,11 +278,12 @@ load_fw_device() {
 	        echo_file="$FIRMWARE_DIR/OCT6104E-256D.ima"
 		law=''
 		law_str='uLaw'
-		card_type=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'CARD 4' | sed -e 's/.*type=//' -e 's/\..*//'`
-		caps_num=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'ECHO ports' | sed -e 's/.*: *//'`
-		if [ $card_type -eq 5 ]; then
+		abtool_output=`$ASTRIBANK_TOOL -D "$dev" -Q 2>&1`
+		ec_card_type=`echo "$abtool_output" | grep 'CARD 4' | sed -e 's/.*type=//' -e 's/\..*//'`
+		caps_num=`echo "$abtool_output" | grep 'ECHO ports' | sed -e 's/.*: *//'`
+		if [ "$ec_card_type" = '5' ]; then
 			debug "ECHO burning into $dev: $echo_file"
-			card_type=`run_astribank_tool -D "$dev" -Q 2>&1 | grep 'CARD 0' | sed -e 's/.*type=//' -e 's/\..*//'`
+			card_type=`echo "$abtool_output" | grep 'CARD 0' | sed -e 's/.*type=//' -e 's/\..*//'`
 			case "$card_type" in
 			3) 	law="-A";;
 			4)
@@ -541,6 +542,9 @@ udev_delayed_load() {
 		usb_firmware_device "$PRODUCT" "$DEVICE"
 		;;
 	e4e4/11[3456]1/*)
+		# There are potentially two separate udev events, for
+		# each of the two endpoints. Ignore the first interface:
+		case "$DEVPATH" in *.0) exit 0;; esac
 		sleep_if_race
 		fpga_firmware_device "$PRODUCT" "$DEVICE" &
 		wait	# parallel firmware loading

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-voip/dahdi-tools.git



More information about the Pkg-voip-commits mailing list