pidgin: f098694f: Register and unregister the PurpleConnec...

deryni at pidgin.im deryni at pidgin.im
Wed Mar 19 23:45:48 EDT 2008


-----------------------------------------------------------------
Revision: f098694fd1cdc20d007bd8673331025582164fed
Ancestor: bd8310274d1042fdb2ed736b385293ff134ddee0
Author: deryni at pidgin.im
Date: 2008-02-26T01:33:35
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/f098694fd1cdc20d007bd8673331025582164fed

Modified files:
        libpurple/account.c

ChangeLog: 

Register and unregister the PurpleConnectionErrorInfo pointers with dbus, I
noticed DBus was screaming about them in the debug log of an unrelated ticket.

-------------- next part --------------
============================================================
--- libpurple/account.c	4d59135382cc3ef5ce38072eb7f30c26c1e349c2
+++ libpurple/account.c	fba455e669705b4fe5a8e341e10ab430ee47a2d2
@@ -751,6 +751,7 @@ parse_current_error(xmlnode *node, Purpl
 		description = g_strdup("");
 
 	current_error = g_new0(PurpleConnectionErrorInfo, 1);
+	PURPLE_DBUS_REGISTER_POINTER(current_error, PurpleConnectionErrorInfo);
 	current_error->type = type;
 	current_error->description = description;
 
@@ -1009,6 +1010,7 @@ purple_account_destroy(PurpleAccount *ac
 		purple_log_free(account->system_log);
 
 	priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
+	PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error);
 	g_free(priv->current_error);
 	g_free(priv);
 
@@ -2365,8 +2367,7 @@ static void
 }
 
 static void
-set_current_error(PurpleAccount *account,
-                  PurpleConnectionErrorInfo *new_err)
+set_current_error(PurpleAccount *account, PurpleConnectionErrorInfo *new_err)
 {
 	PurpleAccountPrivate *priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
 	PurpleConnectionErrorInfo *old_err = priv->current_error;
@@ -2384,6 +2385,7 @@ set_current_error(PurpleAccount *account
 	if(old_err)
 		g_free(old_err->description);
 
+	PURPLE_DBUS_UNREGISTER_POINTER(old_err);
 	g_free(old_err);
 }
 
@@ -2395,6 +2397,7 @@ connection_error_cb(PurpleConnection *gc
 {
 	PurpleAccount *account = purple_connection_get_account(gc);
 	PurpleConnectionErrorInfo *err = g_new0(PurpleConnectionErrorInfo, 1);
+	PURPLE_DBUS_REGISTER_POINTER(err, PurpleConnectionErrorInfo);
 
 	err->type = type;
 	err->description = g_strdup(description);


More information about the Commits mailing list