changeset 22500:89a036334991

Register and unregister the PurpleConnectionErrorInfo pointers with dbus, I noticed DBus was screaming about them in the debug log of an unrelated ticket.
author Etan Reisner <pidgin@unreliablesource.net>
date Tue, 26 Feb 2008 01:33:35 +0000
parents 63f102c210ad
children cf596f8b7c48
files libpurple/account.c
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/account.c	Mon Feb 25 15:24:49 2008 +0000
+++ b/libpurple/account.c	Tue Feb 26 01:33:35 2008 +0000
@@ -751,6 +751,7 @@
 		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_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
-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 @@
 	if(old_err)
 		g_free(old_err->description);
 
+	PURPLE_DBUS_UNREGISTER_POINTER(old_err);
 	g_free(old_err);
 }
 
@@ -2395,6 +2397,7 @@
 {
 	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);