[libpri-commits] rmudgett: branch 1.4 r1852 - /branches/1.4/q921.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Fri Aug 6 13:22:44 CDT 2010


Author: rmudgett
Date: Fri Aug  6 13:22:39 2010
New Revision: 1852

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1852
Log:
Learn (AGAIN!) why state 7 and state 8 transitions were suppressed.

Modified:
    branches/1.4/q921.c

Modified: branches/1.4/q921.c
URL: http://svnview.digium.com/svn/libpri/branches/1.4/q921.c?view=diff&rev=1852&r1=1851&r2=1852
==============================================================================
--- branches/1.4/q921.c (original)
+++ branches/1.4/q921.c Fri Aug  6 13:22:39 2010
@@ -97,6 +97,29 @@
 static void q921_setstate(struct pri *ctrl, int newstate)
 {
 	if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
+		/*
+		 * Suppress displaying these state transitions:
+		 * Q921_MULTI_FRAME_ESTABLISHED <--> Q921_TIMER_RECOVERY
+		 *
+		 * Q921 keeps flipping back and forth between these two states
+		 * when it has nothing better to do.
+		 */
+		switch (ctrl->q921_state) {
+		case Q921_MULTI_FRAME_ESTABLISHED:
+		case Q921_TIMER_RECOVERY:
+			switch (newstate) {
+			case Q921_MULTI_FRAME_ESTABLISHED:
+			case Q921_TIMER_RECOVERY:
+				/* Suppress displaying this state transition. */
+				ctrl->q921_state = newstate;
+				return;
+			default:
+				break;
+			}
+			break;
+		default:
+			break;
+		}
 		if (ctrl->q921_state != newstate) {
 			pri_message(ctrl, "Changing from state %d(%s) to %d(%s)\n",
 				ctrl->q921_state, q921_state2str(ctrl->q921_state),




More information about the libpri-commits mailing list