Fixed reassembly of fragmented SCCP messages.

git-svn-id: http://yate.null.ro/svn/yate/trunk@4740 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2011-12-07 14:58:45 +00:00
parent d4c2f0020c
commit e4e59f6a68
1 changed files with 14 additions and 17 deletions

View File

@ -219,9 +219,10 @@ static bool compareNamedList(const NamedList& nl1, const NamedList& nl2)
{
if (nl1.length() != nl2.length())
return false;
for (unsigned int i = 0;i < nl1.length();i++) {
NamedString* pr = nl1.getParam(i);
if (!nl2.getParam(*pr))
NamedIterator iter(nl1);
while (const NamedString* pr = iter.get()) {
const NamedString* pr2 = nl2.getParam(pr->name());
if (!pr2 || (*pr2 != *pr))
return false;
}
return true;
@ -1382,9 +1383,7 @@ bool SS7MsgSccpReassemble::canProcess(const SS7MsgSCCP* msg, const SS7Label& lab
return false;
NamedList address("");
address.copySubParams(msg->params(),YSTRING("CallingPartyAddress."));
if (!compareNamedList(address,m_callingPartyAddress))
return false;
return true;
return compareNamedList(address,m_callingPartyAddress);
}
SS7MsgSccpReassemble::Return SS7MsgSccpReassemble::appendSegment(SS7MsgSCCP* msg, const SS7Label& label)
@ -3687,20 +3686,18 @@ bool SS7SCCP::routeSCLCMessage(SS7MsgSCCP*& msg, const SS7Label& label)
msg = finishead;
}
}
// intentionally fall through
case SS7MsgSCCP::UDT:
{
lock.drop();
int ret = pushMessage(*msg->getData(),msg->params(),ssn);
if (ret == HandledMSU::Accepted)
return true;
if (m_management)
m_management->subsystemFailure(msg,label);
if (ret == HandledMSU::Unequipped)
errorCode = UnequippedUser;
else
errorCode = SubsystemFailure;
{
int ret = pushMessage(*msg->getData(),msg->params(),ssn);
if (ret == HandledMSU::Accepted)
return true;
if (m_management)
m_management->subsystemFailure(msg,label);
errorCode = (ret == HandledMSU::Unequipped) ? UnequippedUser : SubsystemFailure;
}
break;
}
case SS7MsgSCCP::XUDTS:
case SS7MsgSCCP::LUDTS:
if (msg->params().getParam(YSTRING("Segmentation"))) {