Add the handler's name to "handlers" before calling the handler.

This reduces confusion for reentrant messages (lateroute).


git-svn-id: http://voip.null.ro/svn/yate@5113 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-06-13 08:23:50 +00:00
parent bd4b52d949
commit a2970a5f6c
1 changed files with 7 additions and 10 deletions

View File

@ -380,9 +380,13 @@ bool MessageDispatcher::dispatch(Message& msg)
continue;
unsigned int c = m_changes;
unsigned int p = h->priority();
String handlerName;
if (trackParam())
handlerName = h->trackName();
if (trackParam() && h->trackName()) {
NamedString* tracked = msg.getParam(trackParam());
if (tracked)
tracked->append(h->trackName(),",");
else
msg.addParam(trackParam(),h->trackName());
}
// mark handler as unsafe to destroy / uninstall
h->m_unsafe++;
unlock();
@ -396,13 +400,6 @@ bool MessageDispatcher::dispatch(Message& msg)
Debug(DebugInfo,"Message '%s' [%p] passed through %p in " FMT64U " usec",
msg.c_str(),&msg,h,tm);
#endif
if (handlerName) {
NamedString* tracked = msg.getParam(trackParam());
if (tracked)
tracked->append(handlerName,",");
else
msg.addParam(trackParam(),handlerName);
}
if (retv && !msg.broadcast())
break;
lock();