[svn-commits] rmudgett: branch group/CCSS r244032 - /team/group/CCSS/channels/
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Thu Jan 28 18:20:37 CST 2010
Author: rmudgett
Date: Thu Jan 28 18:20:33 2010
New Revision: 244032
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=244032
Log:
Collect PRI debug flags to an easily accessible location to add CC debugging.
Modified:
team/group/CCSS/channels/chan_dahdi.c
team/group/CCSS/channels/sig_pri.c
team/group/CCSS/channels/sig_pri.h
Modified: team/group/CCSS/channels/chan_dahdi.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/chan_dahdi.c?view=diff&rev=244032&r1=244031&r2=244032
==============================================================================
--- team/group/CCSS/channels/chan_dahdi.c (original)
+++ team/group/CCSS/channels/chan_dahdi.c Thu Jan 28 18:20:33 2010
@@ -13780,9 +13780,7 @@
for (x = 0; x < NUM_DCHANS; x++) {
if (pris[span-1].pri.dchans[x]) {
if (level == 1) {
- pri_set_debug(pris[span-1].pri.dchans[x], PRI_DEBUG_APDU |
- PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE |
- PRI_DEBUG_Q921_STATE);
+ pri_set_debug(pris[span-1].pri.dchans[x], SIG_PRI_DEBUG_NORMAL);
ast_cli(a->fd, "Enabled debugging on span %d\n", span);
} else if (level == 0) {
pri_set_debug(pris[span-1].pri.dchans[x], 0);
@@ -13793,9 +13791,7 @@
ast_cli(a->fd, "PRI debug output to file disabled\n");
ast_mutex_unlock(&pridebugfdlock);
} else {
- pri_set_debug(pris[span-1].pri.dchans[x], PRI_DEBUG_APDU |
- PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE |
- PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_STATE);
+ pri_set_debug(pris[span-1].pri.dchans[x], SIG_PRI_DEBUG_INTENSE);
ast_cli(a->fd, "Enabled debugging on span %d\n", span);
}
}
Modified: team/group/CCSS/channels/sig_pri.c
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/sig_pri.c?view=diff&rev=244032&r1=244031&r2=244032
==============================================================================
--- team/group/CCSS/channels/sig_pri.c (original)
+++ team/group/CCSS/channels/sig_pri.c Thu Jan 28 18:20:33 2010
@@ -54,12 +54,6 @@
/* define this to send PRI user-user information elements */
#undef SUPPORT_USERUSER
-
-#if 0
-#define DEFAULT_PRI_DEBUG (PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q921_DUMP | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_STATE)
-#else
-#define DEFAULT_PRI_DEBUG 0
-#endif
#if defined(HAVE_PRI_CCSS)
struct sig_pri_cc_agent_prv {
@@ -4837,7 +4831,7 @@
ast_log(LOG_ERROR, "Unable to create PRI structure\n");
return -1;
}
- pri_set_debug(pri->dchans[i], DEFAULT_PRI_DEBUG);
+ pri_set_debug(pri->dchans[i], SIG_PRI_DEBUG_DEFAULT);
pri_set_nsf(pri->dchans[i], pri->nsf);
#ifdef PRI_GETSET_TIMERS
for (x = 0; x < PRI_MAX_TIMERS; x++) {
Modified: team/group/CCSS/channels/sig_pri.h
URL: http://svnview.digium.com/svn/asterisk/team/group/CCSS/channels/sig_pri.h?view=diff&rev=244032&r1=244031&r2=244032
==============================================================================
--- team/group/CCSS/channels/sig_pri.h (original)
+++ team/group/CCSS/channels/sig_pri.h Thu Jan 28 18:20:33 2010
@@ -34,6 +34,37 @@
/* BUGBUG the HAVE_PRI_CCSS line is to be removed when the CCSS branch is merged to trunk and the configure script is updated. */
#define HAVE_PRI_CCSS 1
#endif /* defined(PRI_SUBCMD_CC_AVAILABLE) */
+
+#if defined(PRI_SUBCMD_CC_AVAILABLE)
+/*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
+#define SIG_PRI_DEBUG_NORMAL \
+ (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
+ | PRI_DEBUG_CC)
+
+/*! PRI debug message flags when intense PRI debugging is turned on at the command line. */
+#define SIG_PRI_DEBUG_INTENSE \
+ (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
+ | PRI_DEBUG_CC | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP)
+
+#else
+
+/*! PRI debug message flags when normal PRI debugging is turned on at the command line. */
+#define SIG_PRI_DEBUG_NORMAL \
+ (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE)
+
+/*! PRI debug message flags when intense PRI debugging is turned on at the command line. */
+#define SIG_PRI_DEBUG_INTENSE \
+ (PRI_DEBUG_APDU | PRI_DEBUG_Q931_DUMP | PRI_DEBUG_Q931_STATE | PRI_DEBUG_Q921_STATE \
+ | PRI_DEBUG_Q921_RAW | PRI_DEBUG_Q921_DUMP)
+#endif /* !defined(PRI_SUBCMD_CC_AVAILABLE) */
+
+#if 0
+/*! PRI debug message flags set on initial startup. */
+#define SIG_PRI_DEBUG_DEFAULT SIG_PRI_DEBUG_NORMAL
+#else
+/*! PRI debug message flags set on initial startup. */
+#define SIG_PRI_DEBUG_DEFAULT 0
+#endif
enum sig_pri_tone {
SIG_PRI_TONE_RINGTONE = 0,
More information about the svn-commits
mailing list