From 821030aa770f901a685d0c360f9ed4de7c7f2a8b Mon Sep 17 00:00:00 2001 From: marian Date: Wed, 21 Feb 2007 17:54:18 +0000 Subject: [PATCH] Fixed bug in 'command' stanzas handler git-svn-id: http://voip.null.ro/svn/yate@1197 acf43c95-373e-0410-b603-e72c3f656dc1 --- contrib/yjingle/jbengine.cpp | 10 +++++----- contrib/yjingle/xmpputils.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contrib/yjingle/jbengine.cpp b/contrib/yjingle/jbengine.cpp index 75f00565..93a59e5b 100644 --- a/contrib/yjingle/jbengine.cpp +++ b/contrib/yjingle/jbengine.cpp @@ -236,7 +236,7 @@ JBEvent* JBEngine::getEvent(u_int64_t time) case JBEvent::IqCommandSet: case JBEvent::IqCommandRes: { JabberID jid(event->to()); - if (!jid.node() && !jid.resource() && !processCommand(event)) + if (!processCommand(event)) return event; break; } @@ -467,9 +467,10 @@ bool JBEngine::processDiscoInfo(JBEvent* event) bool JBEngine::processCommand(JBEvent* event) { JBComponentStream* stream = event->stream(); - // Check if we have a stream and this engine is the destination - if (!(stream && event->element() && event->child())) - return false; + if (!(event && event->element() && event->child())) { + event->deref(); + return true; + } //TODO: Check if the engine is the destination. // The destination might be a user switch (event->type()) { @@ -491,7 +492,6 @@ bool JBEngine::processCommand(JBEvent* event) // Release event event->deref(); return true; - } JBComponentStream* JBEngine::findStream(const String& remoteName) diff --git a/contrib/yjingle/xmpputils.h b/contrib/yjingle/xmpputils.h index a8c2112c..7c928107 100644 --- a/contrib/yjingle/xmpputils.h +++ b/contrib/yjingle/xmpputils.h @@ -78,7 +78,7 @@ public: JingleTransport, // http://www.google.com/transport/p2p Dtmf, // http://jabber.org/protocol/jingle/info/dtmf DtmfError, // http://jabber.org/protocol/jingle/info/dtmf#errors - Command, // http://jabber.org/protocol/admin#packets_notification + Command, // http://jabber.org/protocol/command Count, };