Show warning when connecting the server on port 5222

This commit is contained in:
Jan Kaluza 2012-07-17 13:27:00 +02:00
parent 693424e9b9
commit 6b71ab5bf0

View file

@ -191,6 +191,9 @@ void Component::setBuddyFeatures(std::list<std::string> &features) {
void Component::start() {
if (m_component && !m_component->isAvailable()) {
LOG4CXX_INFO(logger, "Connecting XMPP server " << CONFIG_STRING(m_config, "service.server") << " port " << CONFIG_INT(m_config, "service.port"));
if (CONFIG_INT(m_config, "service.port") == 5222) {
LOG4CXX_WARN(logger, "Port 5222 is usually used for client connections, not for component connections! Are you sure you are using right port?");
}
m_reconnectCount++;
m_component->connect(CONFIG_STRING(m_config, "service.server"), CONFIG_INT(m_config, "service.port"));
m_reconnectTimer->stop();