diff --git a/src/networkpluginserver.cpp b/src/networkpluginserver.cpp index a012ee871bce221c7883d6482307f308b21f3021..8e80e321cf9c4070014a68b7370aeecc65cd53ae 100644 --- a/src/networkpluginserver.cpp +++ b/src/networkpluginserver.cpp @@ -708,6 +708,10 @@ void NetworkPluginServer::handleConvMessageAckPayload(const std::string &data) { if (!user) return; + if (payload.id().empty()) { + LOG4CXX_WARN(logger, "Received message ack with empty ID, not forwarding to XMPP."); + return; + } boost::shared_ptr msg(new Swift::Message()); msg->addPayload(boost::make_shared(payload.id())); diff --git a/src/transport.cpp b/src/transport.cpp index 106f062207fc3db7dbc11e43789640b125ba362e..7bd92b4dd5d59bc7bd4330220877a1e39b8f6146 100644 --- a/src/transport.cpp +++ b/src/transport.cpp @@ -231,8 +231,12 @@ void Component::handleConnected() { void Component::handleServerStopped(boost::optional e) { if(e != NULL ) { - if(*e == Swift::BoostConnectionServer::Conflict) + if(*e == Swift::BoostConnectionServer::Conflict) { LOG4CXX_INFO(logger, "Port "<< CONFIG_INT(m_config, "service.port") << " already in use! Stopping server.."); + if (CONFIG_INT(m_config, "service.port") == 5347) { + LOG4CXX_INFO(logger, "Port 5347 is usually used for components. You are using server_mode=1. Are you sure you don't want to use server_mode=0 and run spectrum as component?"); + } + } if(*e == Swift::BoostConnectionServer::UnknownError) LOG4CXX_INFO(logger, "Unknown error occured! Stopping server.."); exit(1);