Don't handle conversations with empty node

This commit is contained in:
HanzZ 2011-10-06 21:44:36 +02:00
parent d8c39d04d0
commit 044c1e395d
2 changed files with 5 additions and 1 deletions

View file

@ -12,7 +12,7 @@ admin_password=test
#cert_password=test #password to that certificate if any
users_per_backend=10
#backend=/home/hanzz/code/libtransport/backends/libpurple/spectrum2_libpurple_backend
backend=/usr/bin/mono /home/hanzz/code/networkplugin-csharp/msnp-sharp-backend/bin/Debug/msnp-sharp-backend.exe
backend=/usr/bin/mono --gc=sgen --profile=log:heapshot /home/hanzz/code/networkplugin-csharp/msnp-sharp-backend/bin/Debug/msnp-sharp-backend.exe
#backend=/home/hanzz/code/libtransport/backends/frotz/spectrum2_frotz_backend
#backend=../../backends/libircclient-qt/spectrum2_libircclient-qt_backend
#protocol=prpl-msn

View file

@ -68,6 +68,10 @@ void ConversationManager::handleMessageReceived(Swift::Message::ref message) {
// name.replace(name.find_last_of("%"), 1, "@"); // OK when commented
// }
std::string name = Buddy::JIDToLegacyName(message->getTo());
if (name.empty()) {
LOG4CXX_WARN(logger, m_user->getJID().toString() << ": Tried to create empty conversation");
return;
}
// create conversation if it does not exist.
if (!m_convs[name]) {