Avoid loopback message (if the same module: it's a message sent by this module)

git-svn-id: http://yate.null.ro/svn/yate/trunk@1194 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2007-02-19 14:19:59 +00:00
parent 2999244bd5
commit d6741dfb6f
1 changed files with 6 additions and 0 deletions

View File

@ -1289,6 +1289,9 @@ void YJGLibThread::run()
*/
bool ResNotifyHandler::received(Message& msg)
{
// Avoid loopback message (if the same module: it's a message sent by this module)
if (MODULE_NAME == msg.getValue("module"))
return false;
JabberID from,to;
// *** Check from/to
if (!iplugin.getJidFrom(from,msg,true))
@ -1431,6 +1434,9 @@ void ResNotifyHandler::sendPresence(JabberID& from, JabberID& to,
*/
bool ResSubscribeHandler::received(Message& msg)
{
// Avoid loopback message (if the same module: it's a message sent by this module)
if (MODULE_NAME == msg.getValue("module"))
return false;
JabberID from,to;
// *** Check from/to
if (!iplugin.decodeJid(from,msg,"from",true))