diff --git a/backends/libpurple/main.cpp b/backends/libpurple/main.cpp index 5ed8db53..d9d0d5b5 100644 --- a/backends/libpurple/main.cpp +++ b/backends/libpurple/main.cpp @@ -217,7 +217,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin { purple_account_set_password(account, password.c_str()); purple_account_set_enabled(account, "spectrum", TRUE); - purple_account_set_bool(account, "custom_smileys", FALSE)); + purple_account_set_bool(account, "custom_smileys", FALSE); const PurpleStatusType *status_type = purple_account_get_status_type_with_primitive(account, PURPLE_STATUS_AVAILABLE); if (status_type != NULL) { diff --git a/include/transport/networkpluginserver.h b/include/transport/networkpluginserver.h index 8533f152..7a2d569b 100644 --- a/include/transport/networkpluginserver.h +++ b/include/transport/networkpluginserver.h @@ -66,6 +66,8 @@ class NetworkPluginServer { return m_clients; } + void collectBackend(); + void handleMessageReceived(NetworkConversation *conv, boost::shared_ptr &message); private: @@ -104,7 +106,6 @@ class NetworkPluginServer { void send(boost::shared_ptr &, const std::string &data); void pingTimeout(); - void collectBackend(); void sendPing(Backend *c); Backend *getFreeClient(); diff --git a/src/admininterface.cpp b/src/admininterface.cpp index adb0a20e..993df116 100644 --- a/src/admininterface.cpp +++ b/src/admininterface.cpp @@ -237,6 +237,9 @@ void AdminInterface::handleMessageReceived(Swift::Message::ref message) { message->setBody(lst); } + else if (message->getBody() == "collect_backend") { + m_server->collectBackend(); + } else if (message->getBody().find("help") == 0) { std::string help; help += "General:\n"; diff --git a/src/networkpluginserver.cpp b/src/networkpluginserver.cpp index 8fd4d41c..6c090018 100644 --- a/src/networkpluginserver.cpp +++ b/src/networkpluginserver.cpp @@ -146,7 +146,7 @@ NetworkPluginServer::NetworkPluginServer(Component *component, Config *config, U m_pingTimer->onTick.connect(boost::bind(&NetworkPluginServer::pingTimeout, this)); m_pingTimer->start(); - m_collectTimer = component->getNetworkFactories()->getTimerFactory()->createTimer(3600000); + m_collectTimer = component->getNetworkFactories()->getTimerFactory()->createTimer(2*3600000); m_collectTimer->onTick.connect(boost::bind(&NetworkPluginServer::collectBackend, this)); m_collectTimer->start(); @@ -601,6 +601,7 @@ void NetworkPluginServer::collectBackend() { } if (backend) { + m_collectTimer->start(); LOG4CXX_INFO(logger, "Backend " << backend << "is set to die"); backend->acceptUsers = false; } @@ -962,7 +963,7 @@ void NetworkPluginServer::sendPing(Backend *c) { NetworkPluginServer::Backend *NetworkPluginServer::getFreeClient() { NetworkPluginServer::Backend *c = NULL; - bool spawnNew = false; +// bool spawnNew = false; for (std::list::const_iterator it = m_clients.begin(); it != m_clients.end(); it++) { // This backend is free. if ((*it)->acceptUsers && (*it)->users.size() < CONFIG_INT(m_config, "service.users_per_backend") && (*it)->connection) {