[libpri-commits] mattf: branch mattf/libpri-1.4-q921-rewrite r1367 - /team/mattf/libpri-1.4-q9...

SVN commits to the libpri project libpri-commits at lists.digium.com
Tue Dec 8 12:53:15 CST 2009


Author: mattf
Date: Tue Dec  8 12:53:12 2009
New Revision: 1367

URL: http://svnview.digium.com/svn/libpri?view=rev&rev=1367
Log:
Print helpful messages to know about lifetime of a TEI.  Also make sure we check the ack_pending flag in TIMER_RECOVERY state

Modified:
    team/mattf/libpri-1.4-q921-rewrite/pri.c
    team/mattf/libpri-1.4-q921-rewrite/q921.c

Modified: team/mattf/libpri-1.4-q921-rewrite/pri.c
URL: http://svnview.digium.com/svn/libpri/team/mattf/libpri-1.4-q921-rewrite/pri.c?view=diff&rev=1367&r1=1366&r2=1367
==============================================================================
--- team/mattf/libpri-1.4-q921-rewrite/pri.c (original)
+++ team/mattf/libpri-1.4-q921-rewrite/pri.c Tue Dec  8 12:53:12 2009
@@ -159,7 +159,7 @@
 	ctrl->timers[PRI_TIMER_TM20] = 2500;		/* Max time awaiting XID response - Q.921 Appendix IV */
 	ctrl->timers[PRI_TIMER_NM20] = 3;			/* Number of XID retransmits - Q.921 Appendix IV */
 	ctrl->timers[PRI_TIMER_T303] = 4 * 1000;			/* Length between SETUP retransmissions and timeout */
-	ctrl->timers[PRI_TIMER_T309] = 6000;		/* Time to wait before clearing calls in case of D-channel transient event.  Q.931 specifies 6-90 seconds */
+	//ctrl->timers[PRI_TIMER_T309] = 6000;		/* Time to wait before clearing calls in case of D-channel transient event.  Q.931 specifies 6-90 seconds */
 
 	ctrl->timers[PRI_TIMER_T_HOLD] = 4 * 1000;	/* Wait for HOLD request response. */
 	ctrl->timers[PRI_TIMER_T_RETRIEVE] = 4 * 1000;/* Wait for RETRIEVE request response. */

Modified: team/mattf/libpri-1.4-q921-rewrite/q921.c
URL: http://svnview.digium.com/svn/libpri/team/mattf/libpri-1.4-q921-rewrite/q921.c?view=diff&rev=1367&r1=1366&r2=1367
==============================================================================
--- team/mattf/libpri-1.4-q921-rewrite/q921.c (original)
+++ team/mattf/libpri-1.4-q921-rewrite/q921.c Tue Dec  8 12:53:12 2009
@@ -921,6 +921,7 @@
 			return NULL;
 		}
 		q921_setstate(sub->subchannel, Q921_TEI_ASSIGNED);
+		pri_error(pri, "Allocating new TEI %d\n", tei);
 		q921_send_tei(pri, Q921_TEI_IDENTITY_ASSIGNED, ri, tei, 1);
 		break;
 	case Q921_TEI_IDENTITY_ASSIGNED:
@@ -1285,6 +1286,8 @@
 			pri_error(pri, "Huh!? no match found in list for TEI %d\n", pri->tei);
 			return;
 		}
+
+		pri_error(pri, "Freeing TEI of %d\n", freep->tei);
 
 		free(freep);
 	}
@@ -1822,9 +1825,16 @@
 
 static void q921_statemachine_check(struct pri *pri)
 {
-	if (pri->q921_state == Q921_MULTI_FRAME_ESTABLISHED) {
+	switch (pri->q921_state) {
+	case Q921_MULTI_FRAME_ESTABLISHED:
 		q921_send_queued_iframes(pri);
 		q921_acknowledge_pending_check(pri);
+		break;
+	case Q921_TIMER_RECOVERY:
+		q921_acknowledge_pending_check(pri);
+		break;
+	default:
+		break;
 	}
 }
 




More information about the libpri-commits mailing list