From 00475b428add3a77a7b6300ca4f4a2ac5c7d7837 Mon Sep 17 00:00:00 2001 From: Jan Kaluza Date: Tue, 11 Dec 2012 11:42:31 +0100 Subject: [PATCH] Try to find out existing adhoc session only when session id is set in IQ --- src/adhocmanager.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/adhocmanager.cpp b/src/adhocmanager.cpp index 14531149..8cda07d6 100644 --- a/src/adhocmanager.cpp +++ b/src/adhocmanager.cpp @@ -116,7 +116,7 @@ bool AdHocManager::handleGetRequest(const Swift::JID& from, const Swift::JID& to bool AdHocManager::handleSetRequest(const Swift::JID& from, const Swift::JID& to, const std::string& id, boost::shared_ptr payload) { AdHocCommand *command = NULL; // Try to find AdHocCommand according to 'from' and session_id - if (m_sessions.find(from) != m_sessions.end()) { + if (!payload->getSessionID().empty() && m_sessions.find(from) != m_sessions.end()) { if (m_sessions[from].find(payload->getSessionID()) != m_sessions[from].end()) { command = m_sessions[from][payload->getSessionID()]; }