[asterisk-commits] rmudgett: trunk r294824 - in /trunk: ./ channels/sig_pri.c channels/sig_pri.h
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Nov 11 20:46:10 CST 2010
Author: rmudgett
Date: Thu Nov 11 20:46:03 2010
New Revision: 294824
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=294824
Log:
Merged revisions 294823 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.8
................
r294823 | rmudgett | 2010-11-11 20:45:22 -0600 (Thu, 11 Nov 2010) | 25 lines
Merged revisions 294822 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.6.2
................
r294822 | rmudgett | 2010-11-11 20:44:12 -0600 (Thu, 11 Nov 2010) | 18 lines
Merged revisions 294821 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r294821 | rmudgett | 2010-11-11 20:41:13 -0600 (Thu, 11 Nov 2010) | 11 lines
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.
(closes issue #17270)
Reported by: jmls
........
................
................
Modified:
trunk/ (props changed)
trunk/channels/sig_pri.c
trunk/channels/sig_pri.h
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.8-merged' - no diff available.
Modified: trunk/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.c?view=diff&rev=294824&r1=294823&r2=294824
==============================================================================
--- trunk/channels/sig_pri.c (original)
+++ trunk/channels/sig_pri.c Thu Nov 11 20:46:03 2010
@@ -981,9 +981,14 @@
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 as D-channel anyway!\n");
- }
+ if (pri->sig != SIG_BRI_PTMP && !pri->no_d_channels) {
+ pri->no_d_channels = 1;
+ ast_log(LOG_WARNING,
+ "Span %d: No D-channels available! Using Primary channel as D-channel anyway!\n",
+ pri->span);
+ }
+ } else {
+ pri->no_d_channels = 0;
}
if (old && (oldslot != newslot))
ast_log(LOG_NOTICE, "Switching from d-channel fd %d to fd %d!\n",
@@ -4386,6 +4391,7 @@
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 */
Modified: trunk/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/sig_pri.h?view=diff&rev=294824&r1=294823&r2=294824
==============================================================================
--- trunk/channels/sig_pri.h (original)
+++ trunk/channels/sig_pri.h Thu Nov 11 20:46:03 2010
@@ -395,6 +395,8 @@
int resetpos; /*!< current position during a reset (-1 if not started) */
int sig; /*!< ISDN signalling type (SIG_PRI, SIG_BRI, SIG_BRI_PTMP, etc...) */
int new_chan_seq; /*!< New struct ast_channel sequence number */
+ /*! TRUE if we have already whined about no D channels available. */
+ unsigned int no_d_channels:1;
/* Everything after here is internally set */
struct pri *dchans[SIG_PRI_NUM_DCHANS]; /*!< Actual d-channels */
More information about the asterisk-commits
mailing list