summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-05 11:15:00 +0200
committerXavier Claessens <xavier.claessens@collabora.co.uk>2012-09-05 15:40:35 +0200
commita934de9b7cdec5204046dacf38afcac9a12eef69 (patch)
tree0808d9a9d161d25d9175955f8dea23176cc5b73f /examples
parent53e5e36d9fa59d62f0ae99caaca3a8ac9d67a1bc (diff)
downloadtelepathy-glib-a934de9b7cdec5204046dacf38afcac9a12eef69.tar.gz
TpAccountManager: Deprecate _get_ functions returning a GList and replace them by _dup_
New transfer and naming policy has been discussed in https://bugs.freedesktop.org/show_bug.cgi?id=39189 and is documented there: http://telepathy.freedesktop.org/wiki/Style/TelepathyGLib
Diffstat (limited to 'examples')
-rw-r--r--examples/client/contact-list.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/client/contact-list.c b/examples/client/contact-list.c
index 825d8c686..36b973443 100644
--- a/examples/client/contact-list.c
+++ b/examples/client/contact-list.c
@@ -18,8 +18,8 @@ account_manager_prepared_cb (GObject *object,
gpointer user_data)
{
TpAccountManager *manager = (TpAccountManager *) object;
- GMainLoop *loop = user_data;
- GList *accounts;
+ GMainLoop *loop = user_data;
+ GList *accounts, *l;
GError *error = NULL;
if (!tp_proxy_prepare_finish (object, res, &error))
@@ -28,8 +28,8 @@ account_manager_prepared_cb (GObject *object,
goto OUT;
}
- for (accounts = tp_account_manager_get_valid_accounts (manager);
- accounts != NULL; accounts = g_list_delete_link (accounts, accounts))
+ accounts = tp_account_manager_dup_valid_accounts (manager);
+ for (l = accounts; l != NULL; l = l->next)
{
TpAccount *account = accounts->data;
TpConnection *connection = tp_account_get_connection (account);
@@ -60,6 +60,7 @@ account_manager_prepared_cb (GObject *object,
}
g_ptr_array_unref (contacts);
}
+ g_list_free_full (accounts, g_object_unref);
OUT:
g_main_loop_quit (loop);