Changeset - 653d3efc5eb0
[Not reviewed]
0 1 0
Vitaly Takmazov - 12 years ago 2013-07-07 10:56:08
vitalyster@gmail.com
Swiften backend: fix processing IQ from JIDs with empty resources
1 file changed with 7 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/swiften/main.cpp
Show inline comments
 
@@ -143,7 +143,13 @@ class SwiftenPlugin : public NetworkPlugin, Swift::XMPPParserClient {
 
			boost::shared_ptr<Swift::IQ> iq = boost::dynamic_pointer_cast<Swift::IQ>(stanza);
 
			if (iq) {
 
				if (m_handlers[user]->m_id2resource.find(stanza->getID()) != m_handlers[user]->m_id2resource.end()) {
 
					iq->setTo(Swift::JID(iq->getTo().getNode(), iq->getTo().getDomain(), m_handlers[user]->m_id2resource[stanza->getID()]));
 
					std::string resource = m_handlers[user]->m_id2resource[stanza->getID()];
 
					if (resource.empty()) {
 
						iq->setTo(Swift::JID(iq->getTo().getNode(), iq->getTo().getDomain()));					
 
					} else {
 
						iq->setTo(Swift::JID(iq->getTo().getNode(), iq->getTo().getDomain(), resource));					
 
					}
 
					
 
					m_handlers[user]->m_id2resource.erase(stanza->getID());
 
				}
 
				client->getIQRouter()->sendIQ(iq);
0 comments (0 inline, 0 general)