Learn (AGAIN!) why state 7 and state 8 transitions were suppressed.
git-svn-id: https://origsvn.digium.com/svn/libpri/branches/1.4@1852 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
parent
fc203e3101
commit
9d1fa7f276
23
q921.c
23
q921.c
@ -97,6 +97,29 @@ static const char *q921_state2str(enum q921_state state)
|
|||||||
static void q921_setstate(struct pri *ctrl, int newstate)
|
static void q921_setstate(struct pri *ctrl, int newstate)
|
||||||
{
|
{
|
||||||
if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
|
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) {
|
if (ctrl->q921_state != newstate) {
|
||||||
pri_message(ctrl, "Changing from state %d(%s) to %d(%s)\n",
|
pri_message(ctrl, "Changing from state %d(%s) to %d(%s)\n",
|
||||||
ctrl->q921_state, q921_state2str(ctrl->q921_state),
|
ctrl->q921_state, q921_state2str(ctrl->q921_state),
|
||||||
|
Loading…
Reference in New Issue
Block a user