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
This commit is contained in:
Matthew Fredrickson 2006-03-31 22:37:46 +00:00
parent e2091c29ef
commit 533412e361

22
q931.c
View File

@ -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)