[thirdparty-commits] rmudgett: mISDN/trunk r94 - /mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c

SVN commits to the Digium third-party software repository thirdparty-commits at lists.digium.com
Mon Apr 13 12:15:01 CDT 2009


Author: rmudgett
Date: Mon Apr 13 12:14:58 2009
New Revision: 94

URL: http://svn.digium.com/svn-view/thirdparty?view=rev&rev=94
Log:
Added handling of EV_RELEASE_CNF to ST_L3_LC_ESTAB_WAIT state to bring L2 back up.

The mISDN L2 and L3 state machines could get into a deadlocked condition
while L2 is going down just as the TE side attempts to initiate a call
or respond to an incoming call.

JIRA ABE-1816, issue 14030

Sequence of events between L2 and L3:
ST_L3_LC_ESTAB::EV_RELEASE_REQ -> ST_L3_LC_REL_DELAY
        Event for various reasons when L3 is no longer needed.
        i.e. RELEASE_COMPLETE is sent.
ST_L3_LC_REL_DELAY::TIMEOUT -> ST_L3_LC_REL_WAIT
        Event sent to L2 state machine to initiate bringing L2 down.
ST_L2_7::EV_L2_DL_RELEASE_REQ -> ST_L2_6
        L2 sends disconnect and waits for a reply.
ST_L3_LC_REL_WAIT::EV_ESTABLISH_REQ -> ST_L3_LC_ESTAB_WAIT
        L3 message (SETUP, SETUP_ACK, or PROCEEDING) attempts to bring
        L2 back up by sending event to L2 to establish link.
ST_L2_6::EV_L2_DL_ESTABLISH_REQ (Ignored)
        L2 is busy still waiting for a reply to the disconnect.
ST_L2_6::EV_L2_UA -> ST_L2_4
        L2 completes going down and sends event to L3.
ST_L3_LC_ESTAB_WAIT::EV_RELEASE_CNF (Ignored)
        L3 thinks L2 is trying to go up so does not know what
        to do when L2 confirms that is has completed going down.
ST_L3_LC_ESTAB_WAIT::EV_ESTABLISH_REQ (Ignored)
        Subsequent messages cannot go out because L3 is already
        waiting for L2 to go up.  Since L2 is never going
        to try to go up anymore, the state machines are
        deadlocked.

Modified:
    mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c

Modified: mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c
URL: http://svn.digium.com/svn-view/thirdparty/mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c?view=diff&rev=94&r1=93&r2=94
==============================================================================
--- mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c (original)
+++ mISDN/trunk/drivers/isdn/hardware/mISDN/layer3.c Mon Apr 13 12:14:58 2009
@@ -495,6 +495,7 @@
 	{ST_L3_LC_ESTAB_WAIT,	EV_ESTABLISH_CNF,	lc_connected},
 	{ST_L3_LC_ESTAB_WAIT,	EV_RELEASE_REQ,		lc_start_delay},
 	{ST_L3_LC_ESTAB_WAIT,	EV_RELEASE_IND,		lc_release_ind},
+	{ST_L3_LC_ESTAB_WAIT,	EV_RELEASE_CNF,		lc_activate},
 	{ST_L3_LC_ESTAB,	EV_RELEASE_IND,		lc_release_ind},
 	{ST_L3_LC_ESTAB,	EV_RELEASE_REQ,		lc_start_delay},
         {ST_L3_LC_REL_DELAY,    EV_RELEASE_IND,         lc_release_ind},




More information about the thirdparty-commits mailing list