From 533412e3611a8a28f07fb9603cc1b5e5df82a208 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Fri, 31 Mar 2006 22:37:46 +0000 Subject: [PATCH] Fix the transmit_display function to not send DISPLAY from CPE->Network on EuroISDN git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@321 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/q931.c b/q931.c index 3f1186a..25cb461 100644 --- a/q931.c +++ b/q931.c @@ -1060,17 +1060,19 @@ static FUNC_RECV(receive_display) 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); + + 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; } - return 0; + memcpy(ie->data + i, call->callername, strlen(call->callername)); + return 2 + i + strlen(call->callername); } static FUNC_RECV(receive_progress_indicator)