Fix callernumber IE to be read only once

git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@203 2fbb986a-6c06-0410-b554-c9c1f0a7f128
This commit is contained in:
Matthew Fredrickson
2005-03-31 20:56:52 +00:00
parent 23a638cf66
commit 02abf57233

6
q931.c
View File

@@ -911,6 +911,12 @@ static FUNC_RECV(receive_calling_party_number)
call->callerplan = ie->data[0] & 0x7f;
extbit = (ie->data[0] >> 7) & 0x01;
/* Somebody's broken PRI stack sent a calling
party number IE twice. One with the callernam
and one without. */
if (strlen(call->callernum))
return 0;
if (extbit) {
q931_get_number(call->callernum, sizeof(call->callernum), ie->data + 1, len - 3);
call->callerpres = 0; /* PI presentation allowed