Fixed users_per_backend
This commit is contained in:
parent
d9fd5794d8
commit
f0f819b4fd
3 changed files with 5 additions and 4 deletions
|
@ -9,8 +9,8 @@ backend_port=10001
|
|||
users_per_backend=2
|
||||
backend=../../backends/libpurple/libpurple_backend
|
||||
#backend=../../backends/libircclient-qt/libircclient-qt_backend
|
||||
protocol=prpl-jabber
|
||||
#protocol=prpl-msn
|
||||
#protocol=prpl-jabber
|
||||
protocol=prpl-msn
|
||||
#protocol=prpl-icq
|
||||
|
||||
[database]
|
||||
|
|
|
@ -36,7 +36,6 @@ Conversation::Conversation(ConversationManager *conversationManager, const std::
|
|||
}
|
||||
|
||||
Conversation::~Conversation() {
|
||||
m_conversationManager->removeConversation(this);
|
||||
}
|
||||
|
||||
void Conversation::handleMessage(boost::shared_ptr<Swift::Message> &message, const std::string &nickname) {
|
||||
|
|
|
@ -172,7 +172,7 @@ void NetworkPluginServer::handleSessionFinished(Client *c) {
|
|||
|
||||
// Execute new session only if there's no free one after this crash/disconnection
|
||||
for (std::list<Client *>::const_iterator it = m_clients.begin(); it != m_clients.end(); it++) {
|
||||
if ((*it)->users.size() < 1) {
|
||||
if ((*it)->users.size() < CONFIG_INT(m_config, "service.users_per_backend")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -530,6 +530,8 @@ void NetworkPluginServer::handleRoomLeft(User *user, const std::string &r) {
|
|||
return;
|
||||
}
|
||||
|
||||
user->getConversationManager()->removeConversation(conv);
|
||||
|
||||
delete conv;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue