[libpri-commits] mattf: branch mattf/libpri-1.4-ntptmp r943 - /team/mattf/libpri-1.4-ntptmp/

SVN commits to the libpri project libpri-commits at lists.digium.com
Tue Jul 21 14:50:19 CDT 2009


Author: mattf
Date: Tue Jul 21 14:50:14 2009
New Revision: 943

URL: http://svn.asterisk.org/svn-view/libpri?view=rev&rev=943
Log:
Make sure we only send SETUP messages as UI frames for now

Modified:
    team/mattf/libpri-1.4-ntptmp/q921.c
    team/mattf/libpri-1.4-ntptmp/q931.c

Modified: team/mattf/libpri-1.4-ntptmp/q921.c
URL: http://svn.asterisk.org/svn-view/libpri/team/mattf/libpri-1.4-ntptmp/q921.c?view=diff&rev=943&r1=942&r2=943
==============================================================================
--- team/mattf/libpri-1.4-ntptmp/q921.c (original)
+++ team/mattf/libpri-1.4-ntptmp/q921.c Tue Jul 21 14:50:14 2009
@@ -910,7 +910,7 @@
 static pri_event *q921_receive_MDL(struct pri *pri, q921_u *h, int len)
 {
 	int ri;
-	struct pri *sub;
+	struct pri *sub = pri;
 	int tei;
 
 	if (!BRI_NT_PTMP(pri) && !BRI_TE_PTMP(pri)) {

Modified: team/mattf/libpri-1.4-ntptmp/q931.c
URL: http://svn.asterisk.org/svn-view/libpri/team/mattf/libpri-1.4-ntptmp/q931.c?view=diff&rev=943&r1=942&r2=943
==============================================================================
--- team/mattf/libpri-1.4-ntptmp/q931.c (original)
+++ team/mattf/libpri-1.4-ntptmp/q931.c Tue Jul 21 14:50:14 2009
@@ -2675,7 +2675,7 @@
 	*mhb = mh;
 }
 
-static int q931_xmit(struct pri *ctrl, q931_h *h, int len, int cr)
+static int q931_xmit(struct pri *ctrl, q931_h *h, int len, int cr, int uiframe)
 {
 	/* 
 	 * For NT-PTMP mode, we need to check the following:
@@ -2685,7 +2685,7 @@
 	 * If those are true, we need to send the SETUP in a UI frame
 	 * instead of an I-frame.
 	 */
-	if (BRI_NT_PTMP(ctrl))
+	if (BRI_NT_PTMP(ctrl) && uiframe)
 		q921_transmit_uiframe(ctrl, h, len);
 	else
 		q921_transmit_iframe(ctrl, h, len, cr);
@@ -2741,7 +2741,7 @@
 		ctrl = ctrl->subchannel;
 	}
 	if (ctrl) {
-		q931_xmit(ctrl, h, len, 1);
+		q931_xmit(ctrl, h, len, 1, (msgtype == Q931_SETUP) ? 1 : 0);
 	}
 	call->acked = 1;
 	return 0;
@@ -3583,7 +3583,7 @@
 		   KLUDGE this by changing byte 4 from a 0xf (SERVICE) 
 		   to a 0x7 (SERVICE ACKNOWLEDGE) */
 		h->raw[h->crlen + 2] -= 0x8;
-		q931_xmit(ctrl, h, len, 1);
+		q931_xmit(ctrl, h, len, 1, 0);
 		return 0;
 	}
 	cref = q931_cr(h);




More information about the libpri-commits mailing list