Changeset - 835c66fc6137
[Not reviewed]
0 2 0
Jan Kaluza - 14 years ago 2011-07-26 09:12:34
hanzz.k@gmail.com
force returning of memory chunks allocated by libxml2 to kernel
2 files changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
backends/libpurple/main.cpp
Show inline comments
 
@@ -23,6 +23,9 @@
 
#include "log4cxx/helpers/fileinputstream.h"
 
#include "sys/wait.h"
 
#include "sys/signal.h"
 
// #include "valgrind/memcheck.h"
 
#include "malloc.h"
 

	
 

	
 
using namespace log4cxx;
 

	
 
@@ -218,6 +221,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
			const char *protocol = CONFIG_STRING(config, "service.protocol").c_str();
 
			PurpleAccount *account = purple_accounts_find(legacyName.c_str(), protocol);
 
			if (account) {
 
// 				VALGRIND_DO_LEAK_CHECK;
 
				m_sessions[user] = NULL;
 
				purple_account_set_enabled(account, "spectrum", FALSE);
 

	
 
@@ -263,6 +267,7 @@ class SpectrumNetworkPlugin : public NetworkPlugin {
 
				purple_buddy_icons_set_account_icon(account, NULL, 0);
 

	
 
				purple_account_destroy(account);
 
// 				VALGRIND_DO_LEAK_CHECK;
 
			}
 
		}
 

	
 
@@ -940,6 +945,8 @@ static PurpleCoreUiOps coreUiOps =
 
static void signed_on(PurpleConnection *gc, gpointer unused) {
 
	PurpleAccount *account = purple_connection_get_account(gc);
 
	np->handleConnected(np->m_accounts[account]);
 
	// force returning of memory chunks allocated by libxml2 to kernel
 
	malloc_trim(0);
 
}
 

	
 
static void printDebug(PurpleDebugLevel level, const char *category, const char *arg_s) {
spectrum/src/sample.cfg
Show inline comments
 
@@ -10,7 +10,7 @@ admin_username=admin
 
admin_password=test
 
#cert= #patch to PKCS#12 certificate
 
#cert_password= #password to that certificate if any
 
users_per_backend=2
 
users_per_backend=10
 
backend=../../backends/libpurple/spectrum_libpurple_backend
 
#backend=../../backends/libircclient-qt/spectrum_libircclient-qt_backend
 
#protocol=prpl-jabber
0 comments (0 inline, 0 general)