The "peerid" takes precedence over "targetid". Masquerading rules are applied
before the message is completed. git-svn-id: http://yate.null.ro/svn/yate/trunk@1385 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
8c70488604
commit
dbb2d9982d
|
@ -1076,10 +1076,10 @@ bool Driver::received(Message &msg, int id)
|
|||
dest = msg.getValue("id");
|
||||
break;
|
||||
default:
|
||||
dest = msg.getValue("targetid");
|
||||
// if this channel is not the target try to match it as peer
|
||||
dest = msg.getValue("peerid");
|
||||
// if this channel is not the peer, try to match it as target
|
||||
if (!dest.startsWith(m_prefix))
|
||||
dest = msg.getValue("peerid");
|
||||
dest = msg.getValue("targetid");
|
||||
break;
|
||||
}
|
||||
XDebug(DebugAll,"id=%d prefix='%s' dest='%s'",id,m_prefix.c_str(),dest.c_str());
|
||||
|
@ -1135,8 +1135,10 @@ bool Driver::received(Message &msg, int id)
|
|||
msg = msg.getValue("message");
|
||||
msg.clearParam("message");
|
||||
msg.userData(chan);
|
||||
if (chan->msgMasquerade(msg))
|
||||
return true;
|
||||
chan->complete(msg);
|
||||
return chan->msgMasquerade(msg);
|
||||
return false;
|
||||
case Locate:
|
||||
msg.userData(chan);
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue