Changeset - ce44c83ae8f5
[Not reviewed]
0 4 0
HanzZ - 14 years ago 2011-07-24 21:41:52
hanzz.k@gmail.com
disconnect_all_slots in networkpluginserver
4 files changed with 5 insertions and 5 deletions:
0 comments (0 inline, 0 general)
backends/libircclient-qt/CMakeLists.txt
Show inline comments
 
cmake_minimum_required(VERSION 2.6)
 
FILE(GLOB SRC *.cpp)
 
FILE(GLOB HEADERS *.h)
 
QT4_WRAP_CPP(SRC ${HEADERS})
 
ADD_EXECUTABLE(spectrum_libircclient-qt_backend ${SRC})
 
 
target_link_libraries(spectrum_libircclient-qt_backend ${IRC_LIBRARY} ${QT_LIBRARIES} transport)
 
target_link_libraries(spectrum_libircclient-qt_backend ${IRC_LIBRARY} ${QT_LIBRARIES} transport pthread)
 
 
INSTALL(TARGETS spectrum_libircclient-qt_backend RUNTIME DESTINATION bin)
 
backends/libpurple/CMakeLists.txt
Show inline comments
 
cmake_minimum_required(VERSION 2.6)
 
FILE(GLOB SRC *.cpp)
 
 
ADD_EXECUTABLE(spectrum_libpurple_backend ${SRC})
 
 
target_link_libraries(spectrum_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport)
 
target_link_libraries(spectrum_libpurple_backend ${PURPLE_LIBRARY} ${GLIB2_LIBRARIES} ${EVENT_LIBRARIES} transport pthread)
 
 
INSTALL(TARGETS spectrum_libpurple_backend RUNTIME DESTINATION bin)
 
spectrum/src/sample.cfg
Show inline comments
 
@@ -7,13 +7,13 @@ server_mode = 1
 
backend_host=localhost # < this option doesn't work yet
 
backend_port=10001
 
admin_username=admin
 
admin_password=test
 
#cert= #patch to PKCS#12 certificate
 
#cert_password= #password to that certificate if any
 
users_per_backend=1
 
users_per_backend=10
 
backend=../../backends/libpurple/spectrum_libpurple_backend
 
#backend=../../backends/libircclient-qt/spectrum_libircclient-qt_backend
 
#protocol=prpl-jabber
 
protocol=prpl-msn
 
#protocol=prpl-icq
 

	
src/networkpluginserver.cpp
Show inline comments
 
@@ -225,14 +225,14 @@ void NetworkPluginServer::handleSessionFinished(Backend *c) {
 
	for (std::list<User *>::const_iterator it = c->users.begin(); it != c->users.end(); it++) {
 
		LOG4CXX_ERROR(logger, "Backend " << c << " disconnected (probably crashed) with active user " << (*it)->getJID().toString());
 
		(*it)->setData(NULL);
 
		(*it)->handleDisconnected("Internal Server Error, please reconnect.");
 
	}
 

	
 
	c->connection->onDisconnected.disconnect(boost::bind(&NetworkPluginServer::handleSessionFinished, this, c));
 
	c->connection->onDataRead.disconnect(boost::bind(&NetworkPluginServer::handleDataRead, this, c, _1));
 
	c->connection->onDisconnected.disconnect_all_slots();
 
	c->connection->onDataRead.disconnect_all_slots();
 

	
 
	m_clients.remove(c);
 
	delete c;
 

	
 
	// Execute new session only if there's no free one after this crash/disconnection
 
	for (std::list<Backend *>::const_iterator it = m_clients.begin(); it != m_clients.end(); it++) {
0 comments (0 inline, 0 general)