[Pkg-voip-commits] r1778 - in zaptel/trunk/debian: . patches

Tzafrir Cohen tzafrir-guest at costa.debian.org
Mon May 22 17:25:35 UTC 2006


Author: tzafrir-guest
Date: 2006-05-22 17:25:34 +0000 (Mon, 22 May 2006)
New Revision: 1778

Modified:
   zaptel/trunk/debian/changelog
   zaptel/trunk/debian/genzaptelconf
   zaptel/trunk/debian/patches/xpp_fixes.dpatch
Log:
* genzaptelconf: wait for xpp (astribank) module to register after loadin it
* minor xpp driver fixes (already in 1.2 branch)

Modified: zaptel/trunk/debian/changelog
===================================================================
--- zaptel/trunk/debian/changelog	2006-05-21 19:54:42 UTC (rev 1777)
+++ zaptel/trunk/debian/changelog	2006-05-22 17:25:34 UTC (rev 1778)
@@ -16,8 +16,10 @@
   * zaptel.init: 'unload' operation. Better support for Astribank
   * moduletest script fixes
   * bristuff added ztpty
+  * genzaptelconf: wait for xpp (astribank) module to register after loadin it
+  * minor xpp driver fixes (already in 1.2 branch)
 
- -- Tzafrir Cohen <tzafrir.ochen at xorcom.com>  Thu, 11 May 2006 07:49:55 +0300
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Mon, 22 May 2006 20:24:07 +0300
 
 zaptel (1:1.2.5-1) unstable; urgency=low
 

Modified: zaptel/trunk/debian/genzaptelconf
===================================================================
--- zaptel/trunk/debian/genzaptelconf	2006-05-21 19:54:42 UTC (rev 1777)
+++ zaptel/trunk/debian/genzaptelconf	2006-05-22 17:25:34 UTC (rev 1778)
@@ -8,11 +8,6 @@
 #
 # Copyright (C) 2005 by Xorcom <support at xorcom.com>
 #
-# Note that this script is explicitly does not the definition of 
-# "enhancements to Asterisk" or "contributions to Asterisk" from 
-# http://www.digium.com/disclaimer.txt and is thus not disclaimed and may
-# not be distributed with a non-GPL license.
-#
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation; either version 2 of the License, or
@@ -38,6 +33,7 @@
 #
 # 0.5.1:
 # * Initial support for ztgsm (Junghanns's PCI GSM card)
+# * Wait for the xpp module to register if just loaded
 # 0.5.0:
 # * Not trying to read from zaptel channels: we can run genzaptelconf even 
 #   with asterisk up.
@@ -468,6 +464,24 @@
 	say ''
 }
 
+# sleep a while until the xpp modules fully register
+wait_for_xpp() {
+	if [ -d /proc/xpp ] && \
+	   [ "`cat /sys/module/xpp/parameters/zap_autoreg`" = 'Y' ]
+	then
+		# wait for the XPDs to register:
+		for i in `seq 10`; do
+			sleep 1
+			if ! grep -q 0 /proc/xpp/*/*/zt_registration 2>/dev/null
+			then
+				# There are either no XPDs or all of them are 
+				# registered. Nothing to do
+				break
+			fi
+		done
+	fi
+}
+
 detect() {
 	unload_modules
 	load_modules
@@ -484,6 +498,7 @@
 		say "Updating '${MODLIST_FILE}'"
 		update_module_list "$modlist"
 	fi
+	if echo $modlist | grep -q xpp_usb; then wait_for_xpp; fi
 }
 
 # TODO: kill this function. It is now unreferenced from anywhere.

Modified: zaptel/trunk/debian/patches/xpp_fixes.dpatch
===================================================================
--- zaptel/trunk/debian/patches/xpp_fixes.dpatch	2006-05-21 19:54:42 UTC (rev 1777)
+++ zaptel/trunk/debian/patches/xpp_fixes.dpatch	2006-05-22 17:25:34 UTC (rev 1778)
@@ -2,15 +2,21 @@
 ## xpp_fixes.dpatch by  <tzafrir at localhost>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: No description.
-## -- already in 1.2 branch
-
- at DPATCH@
-diff -urNad zaptel-1.2.5/xpp/xpp_usb.c /tmp/dpep.f30gdf/zaptel-1.2.5/xpp/xpp_usb.c
---- zaptel-1.2.5/xpp/xpp_usb.c	2006-03-29 01:31:11.000000000 +0200
-+++ /tmp/dpep.f30gdf/zaptel-1.2.5/xpp/xpp_usb.c	2006-03-29 01:31:45.000000000 +0200
-@@ -49,7 +49,7 @@
+## DP: Fixes in the XPP drivers that were already merged into the stable 
+## DP: Zaptel tree
+Index: xpp_usb.c
+===================================================================
+--- zaptel-1.2.5/xpp/xpp_usb.c	(.../tags/1.2.5/xpp)	(revision 1006)
++++ zaptel-1.2.5/xpp/xpp_usb.c	(.../branches/1.2/xpp)	(revision 1006)
+@@ -43,13 +43,13 @@
  
+ static const char revision[] = "$Revision$";
+ 
+-DEF_PARM(int, print_dbg, 1, "Print DBG statements");	/* must be before zap_debug.h */
++DEF_PARM(int, print_dbg, 0, "Print DBG statements");	/* must be before zap_debug.h */
+ 
+ #include "zap_debug.h"
+ 
  /* FIXME: A flag that was deprecated at some point, and rather useless */
  /* anyway. Only used in the code or-ed to other flags                  */
 -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14)
@@ -18,3 +24,29 @@
  #  define URB_ASYNC_UNLINK 0
  #endif
  
+Index: xpp_zap.c
+===================================================================
+--- zaptel-1.2.5/xpp/xpp_zap.c	(.../tags/1.2.5/xpp)	(revision 1006)
++++ zaptel-1.2.5/xpp/xpp_zap.c	(.../branches/1.2/xpp)	(revision 1006)
+@@ -73,7 +73,7 @@
+ 
+ static	LIST_HEAD(xpd_list);
+ 
+-DEF_PARM(int, print_dbg, 1, "Print DBG statements");
++DEF_PARM(int, print_dbg, 0, "Print DBG statements");
+ DEF_PARM(int, max_queue_len, MAX_QUEUE_LEN, "Maximum Queue Length.");
+ DEF_PARM(int, xbus_err_disable_bus, 1000, "Number of errors needed to disable bus");
+ DEF_PARM(int, ignore_xpds, 0, "a bitmask of xpd numbers to ignore");
+Index: card_fxs.c
+===================================================================
+--- zaptel-1.2.5/xpp/card_fxs.c	(.../tags/1.2.5/xpp)	(revision 1006)
++++ zaptel-1.2.5/xpp/card_fxs.c	(.../branches/1.2/xpp)	(revision 1006)
+@@ -31,7 +31,7 @@
+ static const char rcsid[] = "$Id$";
+ static const char revision[] = "$Revision$";
+ 
+-DEF_PARM(int, print_dbg, 1, "Print DBG statements");	/* must be before zap_debug.h */
++DEF_PARM(int, print_dbg, 0, "Print DBG statements");	/* must be before zap_debug.h */
+ 
+ #define	LINES_REGULAR	8
+ #define	LINES_DIGI_OUT	2




More information about the Pkg-voip-commits mailing list