Changeset - f0f819b4fd95
[Not reviewed]
0 3 0
HanzZ - 14 years ago 2011-06-12 19:25:51
hanzz.k@gmail.com
Fixed users_per_backend
3 files changed with 5 insertions and 4 deletions:
0 comments (0 inline, 0 general)
spectrum/src/sample.cfg
Show inline comments
 
@@ -6,13 +6,13 @@ port = 5222
 
server_mode = 1
 
backend_host=localhost # < this option doesn't work yet
 
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]
 
database = test.sql
 
prefix=icq
src/conversation.cpp
Show inline comments
 
@@ -33,13 +33,12 @@ Conversation::Conversation(ConversationManager *conversationManager, const std::
 
	m_conversationManager->addConversation(this);
 
	m_muc = isMUC;
 
	std::cout << "new conversation " << legacyName << "\n";
 
}
 

	
 
Conversation::~Conversation() {
 
	m_conversationManager->removeConversation(this);
 
}
 

	
 
void Conversation::handleMessage(boost::shared_ptr<Swift::Message> &message, const std::string &nickname) {
 
	if (m_muc) {
 
		message->setType(Swift::Message::Groupchat);
 
	}
src/networkpluginserver.cpp
Show inline comments
 
@@ -169,13 +169,13 @@ void NetworkPluginServer::handleSessionFinished(Client *c) {
 

	
 
	m_clients.remove(c);
 
	delete 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;
 
		}
 
	}
 
	exec_(CONFIG_STRING(m_config, "service.backend").c_str(), CONFIG_STRING(m_config, "service.backend_host").c_str(), CONFIG_STRING(m_config, "service.backend_port").c_str(), m_config->getConfigFile().c_str());
 
}
 

	
 
@@ -527,12 +527,14 @@ void NetworkPluginServer::handleRoomLeft(User *user, const std::string &r) {
 

	
 
	NetworkConversation *conv = (NetworkConversation *) user->getConversationManager()->getConversation(r);
 
	if (!conv) {
 
		return;
 
	}
 

	
 
	user->getConversationManager()->removeConversation(conv);
 

	
 
	delete conv;
 
}
 

	
 
void NetworkPluginServer::handleUserDestroyed(User *user) {
 
	UserInfo userInfo = user->getUserInfo();
 

	
0 comments (0 inline, 0 general)