Allow specifying a filter for Javascript message handlers.
Mask message handlers early enough to avoid trace file races at shutdown. git-svn-id: http://yate.null.ro/svn/yate/trunk@5443 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
e08e529ecf
commit
d6476113c5
|
@ -811,6 +811,10 @@ bool JsMessage::runNative(ObjList& stack, const ExpOperation& oper, GenObject* c
|
|||
return false;
|
||||
}
|
||||
JsHandler* h = new JsHandler(*name,priority,*func,context);
|
||||
ExpOperation* filterName = static_cast<ExpOperation*>(args[3]);
|
||||
ExpOperation* filterValue = static_cast<ExpOperation*>(args[4]);
|
||||
if (filterName && filterValue && *filterName)
|
||||
h->setFilter(*filterName,*filterValue);
|
||||
m_handlers.append(h);
|
||||
Engine::install(h);
|
||||
}
|
||||
|
@ -2231,8 +2235,8 @@ bool JsModule::received(Message& msg, int id)
|
|||
}
|
||||
break;
|
||||
case Halt:
|
||||
JsGlobal::unloadAll();
|
||||
s_engineStop = true;
|
||||
JsGlobal::unloadAll();
|
||||
return false;
|
||||
} // switch (id)
|
||||
return ChanAssistList::received(msg,id);
|
||||
|
|
Loading…
Reference in New Issue