Changeset - 6a4fffdfe8c7
[Not reviewed]
0 1 0
Jan Kaluza - 14 years ago 2011-04-05 11:10:56
hanzz.k@gmail.com
Fixed crash in component mode in handleDisconnected
1 file changed with 5 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/user.cpp
Show inline comments
 
@@ -111,8 +111,12 @@ void User::handleDisconnected(const std::string &error) {
 
	boost::shared_ptr<Swift::Message> msg(new Swift::Message());
 
	msg->setBody(error);
 
	msg->setTo(m_jid.toBare());
 
	msg->setFrom(m_component->getJID());
 
	m_component->getStanzaChannel()->sendMessage(msg);
 
	dynamic_cast<Swift::ServerStanzaChannel *>(m_component->getStanzaChannel())->finishSession(m_jid, boost::shared_ptr<Swift::Element>(new Swift::StreamError()));
 

	
 
	if (m_component->inServerMode()) {
 
		dynamic_cast<Swift::ServerStanzaChannel *>(m_component->getStanzaChannel())->finishSession(m_jid, boost::shared_ptr<Swift::Element>(new Swift::StreamError()));
 
	}
 

	
 
	m_userManager->removeUser(this);
 
}
0 comments (0 inline, 0 general)