comparison libpurple/account.c @ 22518:cf596f8b7c48

merge of '3195166356877e091e9b3d663bc03f7682ed3a17' and 'f098694fd1cdc20d007bd8673331025582164fed'
author Etan Reisner <pidgin@unreliablesource.net>
date Wed, 27 Feb 2008 00:24:57 +0000
parents 5fd8b4b4c6bd 89a036334991
children e62b3625cc54
comparison
equal deleted inserted replaced
22341:981169c12d12 22518:cf596f8b7c48
749 description = xmlnode_get_data(child); 749 description = xmlnode_get_data(child);
750 if (description == NULL) 750 if (description == NULL)
751 description = g_strdup(""); 751 description = g_strdup("");
752 752
753 current_error = g_new0(PurpleConnectionErrorInfo, 1); 753 current_error = g_new0(PurpleConnectionErrorInfo, 1);
754 PURPLE_DBUS_REGISTER_POINTER(current_error, PurpleConnectionErrorInfo);
754 current_error->type = type; 755 current_error->type = type;
755 current_error->description = description; 756 current_error->description = description;
756 757
757 set_current_error(account, current_error); 758 set_current_error(account, current_error);
758 } 759 }
1007 1008
1008 if(account->system_log) 1009 if(account->system_log)
1009 purple_log_free(account->system_log); 1010 purple_log_free(account->system_log);
1010 1011
1011 priv = PURPLE_ACCOUNT_GET_PRIVATE(account); 1012 priv = PURPLE_ACCOUNT_GET_PRIVATE(account);
1013 PURPLE_DBUS_UNREGISTER_POINTER(priv->current_error);
1012 g_free(priv->current_error); 1014 g_free(priv->current_error);
1013 g_free(priv); 1015 g_free(priv);
1014 1016
1015 PURPLE_DBUS_UNREGISTER_POINTER(account); 1017 PURPLE_DBUS_UNREGISTER_POINTER(account);
1016 g_free(account); 1018 g_free(account);
2363 PurpleAccount *account = purple_connection_get_account(gc); 2365 PurpleAccount *account = purple_connection_get_account(gc);
2364 purple_account_clear_current_error(account); 2366 purple_account_clear_current_error(account);
2365 } 2367 }
2366 2368
2367 static void 2369 static void
2368 set_current_error(PurpleAccount *account, 2370 set_current_error(PurpleAccount *account, PurpleConnectionErrorInfo *new_err)
2369 PurpleConnectionErrorInfo *new_err)
2370 { 2371 {
2371 PurpleAccountPrivate *priv; 2372 PurpleAccountPrivate *priv;
2372 PurpleConnectionErrorInfo *old_err; 2373 PurpleConnectionErrorInfo *old_err;
2373 2374
2374 g_return_if_fail(account != NULL); 2375 g_return_if_fail(account != NULL);
2387 schedule_accounts_save(); 2388 schedule_accounts_save();
2388 2389
2389 if(old_err) 2390 if(old_err)
2390 g_free(old_err->description); 2391 g_free(old_err->description);
2391 2392
2393 PURPLE_DBUS_UNREGISTER_POINTER(old_err);
2392 g_free(old_err); 2394 g_free(old_err);
2393 } 2395 }
2394 2396
2395 static void 2397 static void
2396 connection_error_cb(PurpleConnection *gc, 2398 connection_error_cb(PurpleConnection *gc,