From 02abf57233c937d4bb318973a5863944ac0edde6 Mon Sep 17 00:00:00 2001 From: Matthew Fredrickson Date: Thu, 31 Mar 2005 20:56:52 +0000 Subject: [PATCH] Fix callernumber IE to be read only once git-svn-id: https://origsvn.digium.com/svn/libpri/trunk@203 2fbb986a-6c06-0410-b554-c9c1f0a7f128 --- q931.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/q931.c b/q931.c index 6ad5406..4107853 100755 --- a/q931.c +++ b/q931.c @@ -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