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

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Mar 28 11:40:27 CDT 2013


Author: rmudgett
Date: Thu Mar 28 11:40:22 2013
New Revision: 2315

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2315
Log:
Fix hole in layer2_persistence option for TE PTMP links.

If the network stops responding, according to Q.921 we are supposed to
remove the TEI.  With the layer2_persistence option enabled, we are
supposed to keep trying to bring layer 2 back up.  Unfortunately, when the
network stops responding, we stopped the restart timer and removed the
TEI.  As a result, layer 2 does not immediately come back up.

* Made not stop the restart timer if we are removing the TEI on the CPE
side.  Also handle the timer expiration in relevant unassigned TEI states.

(closes issue LIBPRI-72)
Reported by: Trey Blancher
Patches:
      jira_dahdi_1001_libpri_v1.4.patch (license #5621) patch uploaded by rmudgett

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=2315&r1=2314&r2=2315
==============================================================================
--- branches/1.4/q921.c (original)
+++ branches/1.4/q921.c Thu Mar 28 11:40:22 2013
@@ -557,7 +557,7 @@
 		break;
 	case Q921_ASSIGN_AWAITING_TEI:
 		if (ctrl->debug & PRI_DEBUG_Q921_STATE) {
-			pri_message(ctrl, "Kick starting link when get TEI.\n");
+			pri_message(ctrl, "Kick starting link when awaiting TEI.\n");
 		}
 		q921_setstate(link, Q921_ESTABLISH_AWAITING_TEI);
 		break;
@@ -586,6 +586,8 @@
 	link->restart_timer = 0;
 
 	switch (link->state) {
+	case Q921_TEI_UNASSIGNED:
+	case Q921_ASSIGN_AWAITING_TEI:
 	case Q921_TEI_ASSIGNED:
 		/* Try to bring layer 2 up. */
 		kick_start_link(link);
@@ -1911,7 +1913,9 @@
 
 	switch (link->state) {
 	case Q921_TEI_ASSIGNED:
-		restart_timer_stop(link);
+		if (mdl_free_me) {
+			restart_timer_stop(link);
+		}
 		/* XXX: deviation! Since we don't have a UI queue, we just discard our I-queue */
 		q921_discard_iqueue(link);
 		q921_setstate(link, Q921_TEI_UNASSIGNED);




More information about the libpri-commits mailing list