[libpri-commits] trunk r321 - /trunk/q931.c

libpri-commits at lists.digium.com libpri-commits at lists.digium.com
Fri Mar 31 15:37:47 MST 2006


Author: mattf
Date: Fri Mar 31 16:37:46 2006
New Revision: 321

URL: http://svn.digium.com/view/libpri?rev=321&view=rev
Log:
Fix the transmit_display function to not send DISPLAY from CPE->Network on EuroISDN

Modified:
    trunk/q931.c

Modified: trunk/q931.c
URL: http://svn.digium.com/view/libpri/trunk/q931.c?rev=321&r1=320&r2=321&view=diff
==============================================================================
--- trunk/q931.c (original)
+++ trunk/q931.c Fri Mar 31 16:37:46 2006
@@ -1060,17 +1060,19 @@
 static FUNC_SEND(transmit_display)
 {
 	int i;
-	if ((pri->switchtype != PRI_SWITCH_NI1) && (pri->switchtype != PRI_SWITCH_QSIG) 
-			&& *call->callername) {
-		i = 0;
-		if(pri->switchtype != PRI_SWITCH_EUROISDN_E1) {
-			ie->data[0] = 0xb1;
-			++i;
-		}
-		memcpy(ie->data + i, call->callername, strlen(call->callername));
-		return 2 + i + strlen(call->callername);
-	}
-	return 0;
+	
+	if ((pri->switchtype == PRI_SWITCH_NI1) || (pri->switchtype == PRI_SWITCH_QSIG)
+		|| ((pri->switchtype == PRI_SWITCH_EUROISDN_E1) && (pri->localtype == PRI_CPE)) ||
+		!call->callername[0])
+		return 0;
+
+	i = 0;
+	if(pri->switchtype != PRI_SWITCH_EUROISDN_E1) {
+		ie->data[0] = 0xb1;
+		++i;
+	}
+	memcpy(ie->data + i, call->callername, strlen(call->callername));
+	return 2 + i + strlen(call->callername);
 }
 
 static FUNC_RECV(receive_progress_indicator)



More information about the libpri-commits mailing list