tp_account_manager_get_valid_accounts() has been deprecated.
Fix an accounts list leak in empathy-sanity-cleaning.
return;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = l->next)
{
self, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
if (self->priv->select_when_ready != NULL)
{
return;
}
- accounts = tp_account_manager_get_valid_accounts (account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (account_manager);
for (l = accounts; l != NULL; l = l->next) {
TpAccount *account = l->data;
chat, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
return;
}
- accounts = tp_account_manager_get_valid_accounts (TP_ACCOUNT_MANAGER (am));
+ accounts = tp_account_manager_dup_valid_accounts (TP_ACCOUNT_MANAGER (am));
for (ptr = accounts; ptr != NULL; ptr = ptr->next)
{
contact_blocking_dialog_refilter_account_chooser (self);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
self->priv->add_temp_ctx = add_temporary_individual_ctx_new (self);
/* Try to add an individual for each connected account */
- accounts = tp_account_manager_get_valid_accounts (self->priv->account_mgr);
+ accounts = tp_account_manager_dup_valid_accounts (self->priv->account_mgr);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
g_object_unref (factory);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
am = tp_account_manager_dup ();
g_return_val_if_fail (am != NULL, NULL);
- accounts = tp_account_manager_get_valid_accounts (am);
+ accounts = tp_account_manager_dup_valid_accounts (am);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
found = g_list_prepend (found, g_object_ref (account));
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
g_object_unref (am);
return found;
gboolean salut_created = FALSE;
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = g_list_next (l))
{
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return !salut_created;
}
goto out;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l; l = l->next)
{
TpConnection *conn = tp_account_get_connection (TP_ACCOUNT (l->data));
if (conn != NULL)
publish_location (data->self, conn, data->force_publication);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
out:
g_object_unref (data->self);
return;
}
- accounts = tp_account_manager_get_valid_accounts (account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (account_manager);
for (l = accounts; l != NULL; l = l->next)
{
TpAccount *account = TP_ACCOUNT (l->data);
tp_g_signal_connect_object (account, "status-changed",
G_CALLBACK (new_connection_cb), self, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
GList *accounts, *l;
manager = empathy_account_chooser_get_account_manager (account_chooser);
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = l->next)
{
get_entities_for_account, ctx);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
_tpl_action_chain_append (self->priv->chain, select_first_entity, self);
_tpl_action_chain_start (self->priv->chain);
return;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts ; l != NULL ; l = g_list_next (l)) {
TpAccount *a = TP_ACCOUNT (l->data);
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
if (!g_network_monitor_get_network_available (priv->connectivity))
sensitive = FALSE;
goto out;
}
- accounts = tp_account_manager_get_valid_accounts (self->priv->mgr);
+ accounts = tp_account_manager_dup_valid_accounts (self->priv->mgr);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
tp_g_signal_connect_object (self->priv->mgr, "account-validity-changed",
G_CALLBACK (account_validity_changed_cb), self, 0);
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
out:
g_object_unref (self);
most_available_presence_changed (account_manager, state, status,
status_message, self);
- accounts = tp_account_manager_get_valid_accounts (self->priv->manager);
+ accounts = tp_account_manager_dup_valid_accounts (self->priv->manager);
for (l = accounts; l != NULL; l = l->next)
{
tp_g_signal_connect_object (l->data, "status-changed",
G_CALLBACK (account_status_changed_cb), self, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
g_free (status);
g_free (status_message);
TP_ACCOUNT_MANAGER_FEATURE_CORE)))
g_critical (G_STRLOC ": %s called before AccountManager ready", G_STRFUNC);
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts; l != NULL; l = l->next)
{
break;
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
g_object_unref (manager);
if (connecting != NULL)
gboolean ret = FALSE;
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
for (l = accounts ; l != NULL; l = g_list_next (l))
{
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return ret;
}
GList *accounts;
gboolean has_accounts;
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
has_accounts = (accounts != NULL);
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return has_accounts;
}
dialog);
/* Add existing accounts */
- accounts = tp_account_manager_get_valid_accounts (priv->account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (priv->account_manager);
for (l = accounts; l; l = l->next)
{
accounts_dialog_add_account (dialog, l->data);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
priv->cms = empathy_connection_managers_dup_singleton ();
GList *accounts, *l;
TpAccount *found = NULL;
- accounts = tp_account_manager_get_valid_accounts (mgr);
+ accounts = tp_account_manager_dup_valid_accounts (mgr);
for (l = accounts; l != NULL; l = g_list_next (l))
{
if (!tp_strdiff (tp_proxy_get_object_path (l->data), path))
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
return found;
}
GList *accounts, *ptr;
char *retval;
- accounts = tp_account_manager_get_valid_accounts (self->priv->am);
+ accounts = tp_account_manager_dup_valid_accounts (self->priv->am);
for (ptr = accounts; ptr != NULL; ptr = ptr->next)
{
}
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
if (g_hash_table_size (protocols) > 0)
{
value = g_hash_table_lookup (data->settings, "account");
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
/* Only set the "Import" cell to be active if there isn't already an
* account set up with the same account id. */
import = !import_widget_account_id_in_list (accounts,
g_value_get_string (value));
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
gtk_list_store_insert_with_values (GTK_LIST_STORE (model), NULL, -1,
COL_IMPORT, import,
gtk_spinner_stop (GTK_SPINNER (self->priv->spinner_loading));
- accounts = tp_account_manager_get_valid_accounts (
+ accounts = tp_account_manager_dup_valid_accounts (
self->priv->account_manager);
len = g_list_length (accounts);
display_page_contact_list (self);
out:
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
return;
}
- accounts = tp_account_manager_get_valid_accounts (self->priv->account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (
+ self->priv->account_manager);
for (j = accounts; j != NULL; j = j->next)
{
TpAccount *account = TP_ACCOUNT (j->data);
set_notebook_page (self);
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
void
{
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (am);
+ accounts = tp_account_manager_dup_valid_accounts (am);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
g_hash_table_unref (params);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
{
GList *accounts, *l;
- accounts = tp_account_manager_get_valid_accounts (am);
+ accounts = tp_account_manager_dup_valid_accounts (am);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
g_hash_table_unref (params);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
manager = empathy_uoa_manager_dup ();
- accounts = tp_account_manager_get_valid_accounts (ctx->am);
+ accounts = tp_account_manager_dup_valid_accounts (ctx->am);
for (l = accounts; l != NULL; l = g_list_next (l))
{
TpAccount *account = l->data;
migrate_account_to_uoa (ctx->am, account);
}
+ g_list_free_full (accounts, g_object_unref);
+
g_object_unref (manager);
}
#endif
return;
}
- list = tp_account_manager_get_valid_accounts (account_manager);
+ list = tp_account_manager_dup_valid_accounts (account_manager);
for (l = list; l != NULL; l = l->next) {
tp_g_signal_connect_object (l->data, "status-changed",
G_CALLBACK (status_icon_status_changed_cb),
icon, 0);
}
- g_list_free (list);
+ g_list_free_full (list, g_object_unref);
status_icon_presence_changed_cb (icon);
}
return;
}
- accounts = tp_account_manager_get_valid_accounts (account_manager);
+ accounts = tp_account_manager_dup_valid_accounts (account_manager);
for (l = accounts; l != NULL; l = g_list_next (l))
{
tp_g_signal_connect_object (account, "notify::connection",
G_CALLBACK (account_connection_changed_cb), chatroom_manager, 0);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
}
static void
goto out;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
while (accounts != NULL)
{
TpAccount *account = accounts->data;
accounts = g_list_delete_link (accounts, accounts);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
out:
tp_weak_ref_destroy (wr);
goto out;
}
- accounts = tp_account_manager_get_valid_accounts (manager);
+ accounts = tp_account_manager_dup_valid_accounts (manager);
while (accounts != NULL)
{
TpAccount *account = accounts->data;
accounts = g_list_delete_link (accounts, accounts);
}
- g_list_free (accounts);
+ g_list_free_full (accounts, g_object_unref);
out:
tp_weak_ref_destroy (wr);