Fixed message compatibility information interpretation.

git-svn-id: http://voip.null.ro/svn/yate@3558 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2010-08-28 23:54:29 +00:00
parent 65bd9cb359
commit e3c3386e4e
1 changed files with 16 additions and 2 deletions

View File

@ -2025,8 +2025,22 @@ static void getMsgCompat(SS7MsgISUP* msg, bool& release, bool& cnf)
String* msgCompat = msg->params().getParam("MessageCompatInformation");
if (msgCompat) {
ObjList* l = msgCompat->split(',',false);
release = l->find("release") || l->find("nopass-release");
cnf = !release && l->find("cnf");
// Use a while() to make sure the list is destroyed
// Assume we are not a transit network
while (l->find("end-node")) {
release = (0 != l->find("release"));
if (release)
break;
// Discard the message (no pass on). Check if CNF should be sent
if (l->find("discard")) {
cnf = (0 != l->find("cnf"));
break;
}
// Pass on set: we didn't passed on the message. Check REL/CNF
release = (0 != l->find("nopass-release"));
cnf = !release && l->find("cnf");
break;
}
TelEngine::destruct(l);
}
else