[libpri-commits] rmudgett: branch rmudgett/check_tei r2092 - /team/rmudgett/check_tei/q921.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Nov 4 11:23:07 CDT 2010


Author: rmudgett
Date: Thu Nov  4 11:23:02 2010
New Revision: 2092

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=2092
Log:
Remove all TEI's when NT PTMP starts.

Modified:
    team/rmudgett/check_tei/q921.c

Modified: team/rmudgett/check_tei/q921.c
URL: http://svnview.digium.com/svn/libpri/team/rmudgett/check_tei/q921.c?view=diff&rev=2092&r1=2091&r2=2092
==============================================================================
--- team/rmudgett/check_tei/q921.c (original)
+++ team/rmudgett/check_tei/q921.c Thu Nov  4 11:23:02 2010
@@ -2691,6 +2691,17 @@
 		} else {
 			q921_setstate(link, Q921_TEI_UNASSIGNED);
 			pri_schedule_event(ctrl, 0, nt_ptmp_dchannel_up, ctrl);
+			if (!ctrl->link.next) {
+				/*
+				 * We do not have any TEI's so make sure there are no devices
+				 * that think they have a TEI.
+				 *
+				 * Q.921 says we should send the remove message twice, in case
+				 * of link corruption.
+				 */
+				q921_send_tei(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, Q921_TEI_GROUP, 1);
+				q921_send_tei(ctrl, Q921_TEI_IDENTITY_REMOVE, 0, Q921_TEI_GROUP, 1);
+			}
 		}
 	} else {
 		/* PTP mode, no need for TEI management junk */




More information about the libpri-commits mailing list