Fixed bug in 'command' stanzas handler

git-svn-id: http://voip.null.ro/svn/yate@1197 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
marian 2007-02-21 17:54:18 +00:00
parent a208a6a09a
commit 821030aa77
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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,
};