# HG changeset patch # User Etan Reisner # Date 1203989615 0 # Node ID 89a036334991e184466d6cd585e7243ea0cfa456 # Parent 63f102c210ad1b2597d5ba7beadada399298adc5 Register and unregister the PurpleConnectionErrorInfo pointers with dbus, I noticed DBus was screaming about them in the debug log of an unrelated ticket. diff -r 63f102c210ad -r 89a036334991 libpurple/account.c --- 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);