[Pkg-voip-commits] r8717 - in /asterisk/trunk/debian: changelog patches/pri_fix_no_dchan_flood patches/series

tzafrir at alioth.debian.org tzafrir at alioth.debian.org
Thu Jan 20 00:01:25 UTC 2011


Author: tzafrir
Date: Thu Jan 20 00:01:03 2011
New Revision: 8717

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8717
Log:
Patch pri_fix_no_dchan_flood: Avoid a console flood with unplugged ISDN
ports.

Added:
    asterisk/trunk/debian/patches/pri_fix_no_dchan_flood
Modified:
    asterisk/trunk/debian/changelog
    asterisk/trunk/debian/patches/series

Modified: asterisk/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/changelog?rev=8717&op=diff
==============================================================================
--- asterisk/trunk/debian/changelog (original)
+++ asterisk/trunk/debian/changelog Thu Jan 20 00:01:03 2011
@@ -2,8 +2,10 @@
 
   * CVE-2011-0495: URI-encode buffer overflow (Closes: #610487).
   * Document rasterisk in asterisk.8 (Closes: #562140).
-
- -- Tzafrir Cohen <tzafrir at debian.org>  Thu, 20 Jan 2011 01:26:15 +0200
+  * Patch pri_fix_no_dchan_flood: Avoid a console flood with unplugged ISDN
+    ports.
+
+ -- Tzafrir Cohen <tzafrir at debian.org>  Thu, 20 Jan 2011 01:51:38 +0200
 
 asterisk (1:1.6.2.9-2) unstable; urgency=high
 

Added: asterisk/trunk/debian/patches/pri_fix_no_dchan_flood
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/pri_fix_no_dchan_flood?rev=8717&op=file
==============================================================================
--- asterisk/trunk/debian/patches/pri_fix_no_dchan_flood (added)
+++ asterisk/trunk/debian/patches/pri_fix_no_dchan_flood Thu Jan 20 00:01:03 2011
@@ -1,0 +1,59 @@
+From: Richard Mudgett <rmudgett at digium.com>
+Date: Fri, 12 Nov 2010 02:44:12 +0000
+Bug: https://issues.asterisk.org/view.php?id=17270
+Origin: http://svnview.digium.com/svn/asterisk?view=rev&rev=294822
+Subject: Asterisk is getting a "No D-channels available!" warning message every 4 seconds.
+
+Asterisk is just whining too much with this message: "No D-channels
+available!  Using Primary channel XXX as D-channel anyway!".
+
+Filtered the message so it only comes out once if there is no D channel
+available without an intervening D channel available period.
+
+Reported by: jmls
+
+---
+ channels/chan_dahdi.c |   11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/channels/chan_dahdi.c b/channels/chan_dahdi.c
+index c01ddc7..67836b4 100644
+--- a/channels/chan_dahdi.c
++++ b/channels/chan_dahdi.c
+@@ -548,6 +548,8 @@ struct dahdi_pri {
+ #ifdef HAVE_PRI_INBANDDISCONNECT
+ 	unsigned int inbanddisconnect:1;				/*!< Should we support inband audio after receiving DISCONNECT? */
+ #endif
++	/*! TRUE if we have already whined about no D channels available. */
++	unsigned int no_d_channels:1;
+ 	time_t lastreset;						/*!< time when unused channels were last reset */
+ 	long resetinterval;						/*!< Interval (in seconds) for resetting unused channels */
+ 	/*! \brief ISDN signalling type (SIG_PRI, SIG_BRI, SIG_BRI_PTMP, etc...) */
+@@ -4192,10 +4194,14 @@ static int pri_find_dchan(struct dahdi_pri *pri)
+ 	if (newslot < 0) {
+ 		newslot = 0;
+ 		/* This is annoying to see on non persistent layer 2 connections.  Let's not complain in that case */
+-		if (pri->sig != SIG_BRI_PTMP) {
+-			ast_log(LOG_WARNING, "No D-channels available!  Using Primary channel %d as D-channel anyway!\n",
++		if (pri->sig != SIG_BRI_PTMP && !pri->no_d_channels) {
++			pri->no_d_channels = 1;
++			ast_log(LOG_WARNING,
++				"No D-channels available!  Using Primary channel %d as D-channel anyway!\n",
+ 				pri->dchannels[newslot]);
+ 		}
++	} else {
++		pri->no_d_channels = 0;
+ 	}
+ 	if (old && (oldslot != newslot))
+ 		ast_log(LOG_NOTICE, "Switching from from d-channel %d to channel %d!\n",
+@@ -12886,6 +12892,7 @@ static void *pri_dchannel(void *vpri)
+ 
+ 			switch (e->e) {
+ 			case PRI_EVENT_DCHAN_UP:
++				pri->no_d_channels = 0;
+ 				if (!pri->pri) pri_find_dchan(pri);
+ 
+ 				/* Note presense of D-channel */
+-- 
+1.7.2.3
+

Modified: asterisk/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/asterisk/trunk/debian/patches/series?rev=8717&op=diff
==============================================================================
--- asterisk/trunk/debian/patches/series (original)
+++ asterisk/trunk/debian/patches/series Thu Jan 20 00:01:03 2011
@@ -25,5 +25,6 @@
 man_hyphen
 typos
 rtcp_cli_fix
+pri_fix_no_dchan_flood
 AST-2011-001
 rasterisk_man




More information about the Pkg-voip-commits mailing list