Changeset - 40f2a8696b57
[Not reviewed]
0 1 0
Vitaly Takmazov - 12 years ago 2013-05-28 18:05:42
vitalyster@gmail.com
fixed crash when spectrum receives xmpp ping from another server
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/networkpluginserver.cpp
Show inline comments
 
@@ -1074,13 +1074,17 @@ void NetworkPluginServer::handleElement(boost::shared_ptr<Swift::Element> elemen
 
		if (m_id2resource.find(stanza->getTo().toBare().toString() + stanza->getID()) != m_id2resource.end()) {
 
			iq->setTo(Swift::JID(iq->getTo().getNode(), iq->getTo().getDomain(), m_id2resource[stanza->getTo().toBare().toString() + stanza->getID()]));
 
			m_id2resource.erase(stanza->getTo().toBare().toString() + stanza->getID());
 
		}
 
		else {
 
			Swift::Presence::ref highest = m_component->getPresenceOracle()->getHighestPriorityPresence(user->getJID());
 
			iq->setTo(highest->getFrom());
 
			if (highest) {
 
			    iq->setTo(highest->getFrom());
 
			} else {
 
			    iq->setTo(user->getJID());
 
			}
 
		}
 
		m_component->getIQRouter()->sendIQ(iq);
 
		return;
 
	}
 
}
 

	
0 comments (0 inline, 0 general)