[libpri-commits] mattf: trunk r538 - /trunk/q921.c

SVN commits to the libpri project libpri-commits at lists.digium.com
Thu Mar 6 17:41:13 CST 2008


Author: mattf
Date: Thu Mar  6 17:41:13 2008
New Revision: 538

URL: http://svn.digium.com/view/libpri?view=rev&rev=538
Log:
Make sure C/R bit is correct

Modified:
    trunk/q921.c

Modified: trunk/q921.c
URL: http://svn.digium.com/view/libpri/trunk/q921.c?view=diff&rev=538&r1=537&r2=538
==============================================================================
--- trunk/q921.c (original)
+++ trunk/q921.c Thu Mar  6 17:41:13 2008
@@ -95,7 +95,7 @@
 	return 0;
 }
 
-static void q921_send_tei(struct pri *pri, int message, int ri, int ai, int isreq)
+static void q921_send_tei(struct pri *pri, int message, int ri, int ai, int iscommand)
 {
 	q921_u *f;
 
@@ -103,7 +103,7 @@
 		return;
 
 	Q921_INIT(pri, *f);
-	f->h.c_r = isreq;
+	f->h.c_r = (pri->localtype == PRI_NETWORK) ? iscommand : !iscommand;
 	f->ft = Q921_FRAMETYPE_U;
 	f->data[0] = 0x0f;	/* Management entity */
 	f->data[1] = (ri >> 8) & 0xff;




More information about the libpri-commits mailing list