Merge lp:~online-accounts/libaccounts-glib/packaging into lp:libaccounts-glib

Proposed by Alberto Mardegan
Status: Merged
Approved by: David Barth
Approved revision: no longer in the source branch.
Merged at revision: 196
Proposed branch: lp:~online-accounts/libaccounts-glib/packaging
Merge into: lp:libaccounts-glib
Diff against target: 543 lines (+145/-108)
9 files modified
.gitlab-ci.yml (+51/-0)
NEWS (+7/-0)
README.md (+12/-2)
configure.ac (+2/-2)
debian/changelog (+9/-0)
libaccounts-glib/ag-account.c (+19/-38)
libaccounts-glib/ag-internals.h (+3/-5)
libaccounts-glib/ag-manager.c (+41/-60)
m4/gcov.m4 (+1/-1)
To merge this branch: bzr merge lp:~online-accounts/libaccounts-glib/packaging
Reviewer Review Type Date Requested Status
Online Accounts Pending
Review via email: mp+294013@code.launchpad.net

Description of the change

Migrate to GTask

To post a comment you must log in.
196. By Alberto Mardegan

Migrate to GTask Fixes: #1451728

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.gitlab-ci.yml'
--- .gitlab-ci.yml 1970-01-01 00:00:00 +0000
+++ .gitlab-ci.yml 2016-05-20 08:55:52 +0000
@@ -0,0 +1,51 @@
1image: ubuntu:xenial
2
3cache:
4 key: apt-cache
5 paths:
6 - apt-cache/
7
8before_script:
9 - export APT_CACHE_DIR=`pwd`/apt-cache && mkdir -pv $APT_CACHE_DIR
10 - apt-get update -yq && apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yq automake autotools-dev gobject-introspection gtk-doc-tools intltool libgirepository1.0-dev libglib2.0-dev libsqlite3-dev libtool libxml2-dev libxml2-utils python3 python3-gi python-gi-dev
11 - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yq check dbus-test-runner lcov gcovr
12 - apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -yq sudo
13 - useradd -m tester
14 - adduser tester sudo
15
16build_amd64:
17 stage: build
18 script:
19 - export PYTHON=python3
20 - mkdir build
21 - cd build
22 - ../autogen.sh --enable-gtk-doc --enable-gcov --enable-debug --enable-python --disable-wal
23 - make -j 4
24 artifacts:
25 paths:
26 - ./
27
28test_amd64:
29 stage: test
30 script:
31 - cd build
32 - chmod a+rw -R .
33 - sudo -u tester make check || (cat tests/test-suite.log && /bin/false)
34 - sudo -u tester make coverage-html
35 dependencies:
36 - build_amd64
37 artifacts:
38 paths:
39 - ./
40
41pages:
42 stage: deploy
43 script:
44 - mkdir public
45 - cp -a build/coveragereport public/coverage
46 - cp -a build/docs/reference/html/* public/
47 dependencies:
48 - test_amd64
49 artifacts:
50 paths:
51 - public
052
=== modified file 'NEWS'
--- NEWS 2016-02-19 09:42:37 +0000
+++ NEWS 2016-05-20 08:55:52 +0000
@@ -1,5 +1,12 @@
1libaccounts-glib NEWS1libaccounts-glib NEWS
22
3Version 1.22
4------------
5
6* Lib: migrate to GTask
7* Build: enable CI in gitlab
8* Build: add support for lcov 1.12
9
3Version 1.2110Version 1.21
4------------11------------
512
613
=== modified file 'README.md'
--- README.md 2015-09-11 15:07:12 +0000
+++ README.md 2016-05-20 08:55:52 +0000
@@ -2,7 +2,7 @@
2=================================================2=================================================
33
4This project is a library for managing accounts which can be used from GLib4This project is a library for managing accounts which can be used from GLib
5applications. It is part of the @accounts-sso project.5applications. It is part of the [accounts-sso project][accounts-sso].
66
77
8License8License
@@ -15,7 +15,7 @@
15------------------15------------------
1616
17The project depends on GLib (including GIO and GObject), libxml2, sqlite3 and17The project depends on GLib (including GIO and GObject), libxml2, sqlite3 and
18check.18[check][].
19To build it, run:19To build it, run:
20```20```
21./autogen.sh21./autogen.sh
@@ -23,3 +23,13 @@
23make23make
24make install24make install
25```25```
26
27Resources
28---------
29
30[API reference documentation](http://accounts-sso.gitlab.io/libaccounts-glib/)
31
32[Official source code repository](https://gitlab.com/accounts-sso/libaccounts-glib)
33
34[accounts-sso]: https://gitlab.com/groups/accounts-sso
35[check]: https://github.com/libcheck/check
2636
=== modified file 'configure.ac'
--- configure.ac 2016-02-19 09:42:37 +0000
+++ configure.ac 2016-05-20 08:55:52 +0000
@@ -1,7 +1,7 @@
1dnl Process this file with autoconf to produce a configure script.1dnl Process this file with autoconf to produce a configure script.
2AC_PREREQ([2.64])2AC_PREREQ([2.64])
3AC_INIT([libaccounts-glib],3AC_INIT([libaccounts-glib],
4 [1.21],4 [1.22],
5 [https://gitlab.com/accounts-sso/libaccounts-glib/issues],5 [https://gitlab.com/accounts-sso/libaccounts-glib/issues],
6 [libaccounts-glib],6 [libaccounts-glib],
7 [https://gitlab.com/accounts-sso/libaccounts-glib])7 [https://gitlab.com/accounts-sso/libaccounts-glib])
@@ -25,7 +25,7 @@
25GOBJECT_INTROSPECTION_CHECK([1.30.0])25GOBJECT_INTROSPECTION_CHECK([1.30.0])
2626
27LIBACCOUNTS_REQUIRED="glib-2.0 >= 2.2627LIBACCOUNTS_REQUIRED="glib-2.0 >= 2.26
28 gio-2.0 >= 2.3028 gio-2.0 >= 2.36
29 gio-unix-2.029 gio-unix-2.0
30 gobject-2.0 >= 2.35.130 gobject-2.0 >= 2.35.1
31 libxml-2.031 libxml-2.0
3232
=== modified file 'debian/changelog'
--- debian/changelog 2016-02-22 09:12:59 +0000
+++ debian/changelog 2016-05-20 08:55:52 +0000
@@ -1,3 +1,12 @@
1libaccounts-glib (1.22-0ubuntu1) UNRELEASED; urgency=medium
2
3 * New upstream release
4 - Lib: migrate to GTask (LP: #1577373)
5 - Build: enable CI in gitlab
6 - Build: add support for lcov 1.12
7
8 -- Alberto Mardegan <alberto.mardegan@canonical.com> Fri, 20 May 2016 11:54:22 +0300
9
1libaccounts-glib (1.21+16.04.20160222-0ubuntu1) xenial; urgency=medium10libaccounts-glib (1.21+16.04.20160222-0ubuntu1) xenial; urgency=medium
211
3 [ Alberto Mardegan ]12 [ Alberto Mardegan ]
413
=== modified file 'libaccounts-glib/ag-account.c'
--- libaccounts-glib/ag-account.c 2015-12-18 15:16:14 +0000
+++ libaccounts-glib/ag-account.c 2016-05-20 08:55:52 +0000
@@ -4,7 +4,7 @@
4 * This file is part of libaccounts-glib4 * This file is part of libaccounts-glib
5 *5 *
6 * Copyright (C) 2009-2010 Nokia Corporation.6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2012 Canonical Ltd.7 * Copyright (C) 2012-2016 Canonical Ltd.
8 *8 *
9 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>9 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
10 *10 *
@@ -185,8 +185,8 @@
185 */185 */
186 GHashTable *changes_for_watches;186 GHashTable *changes_for_watches;
187187
188 /* GSimpleAsyncResult for the ag_account_store_async operation. */188 /* GTask for the ag_account_store_async operation. */
189 GSimpleAsyncResult *store_async_result;189 GTask *store_task;
190190
191 /* The "foreign" flag means that the account has been created by another191 /* The "foreign" flag means that the account has been created by another
192 * instance and we got informed about it from D-Bus. In this case, all the192 * instance and we got informed about it from D-Bus. In this case, all the
@@ -697,10 +697,7 @@
697{697{
698 AgAccountPrivate *priv = account->priv;698 AgAccountPrivate *priv = account->priv;
699699
700G_GNUC_BEGIN_IGNORE_DEPRECATIONS700 g_clear_object (&priv->store_task);
701 g_simple_async_result_complete_in_idle (priv->store_async_result);
702G_GNUC_END_IGNORE_DEPRECATIONS
703 g_clear_object (&priv->store_async_result);
704701
705 _ag_account_changes_free (changes);702 _ag_account_changes_free (changes);
706}703}
@@ -2486,43 +2483,32 @@
2486 g_return_if_fail (AG_IS_ACCOUNT (account));2483 g_return_if_fail (AG_IS_ACCOUNT (account));
2487 priv = account->priv;2484 priv = account->priv;
24882485
2489 if (G_UNLIKELY (priv->store_async_result != NULL))2486 if (G_UNLIKELY (priv->store_task != NULL))
2490 {2487 {
2491 g_critical ("ag_account_store_async called again before completion");2488 g_critical ("ag_account_store_async called again before completion");
2492G_GNUC_BEGIN_IGNORE_DEPRECATIONS2489 g_task_report_new_error (account,
2493 g_simple_async_report_error_in_idle ((GObject *)account,2490 callback, user_data,
2494 callback, user_data,2491 ag_account_store_async,
2495 AG_ACCOUNTS_ERROR,2492 AG_ACCOUNTS_ERROR,
2496 AG_ACCOUNTS_ERROR_STORE_IN_PROGRESS,2493 AG_ACCOUNTS_ERROR_STORE_IN_PROGRESS,
2497 "Store operation already "2494 "Store operation already in progress");
2498 "in progress");
2499G_GNUC_END_IGNORE_DEPRECATIONS
2500 return;2495 return;
2501 }2496 }
25022497
2503G_GNUC_BEGIN_IGNORE_DEPRECATIONS2498 priv->store_task =
2504 priv->store_async_result =2499 g_task_new (account, cancellable, callback, user_data);
2505 g_simple_async_result_new ((GObject *)account,2500 g_object_add_weak_pointer ((GObject *)priv->store_task,
2506 callback, user_data,2501 (gpointer *)&priv->store_task);
2507 ag_account_store_async);
2508 g_simple_async_result_set_check_cancellable (priv->store_async_result,
2509 cancellable);
2510G_GNUC_END_IGNORE_DEPRECATIONS
2511 g_object_add_weak_pointer ((GObject *)priv->store_async_result,
2512 (gpointer *)&priv->store_async_result);
25132502
2514 if (G_UNLIKELY (priv->changes == NULL))2503 if (G_UNLIKELY (priv->changes == NULL))
2515 {2504 {
2516 /* Nothing to do: invoke the callback immediately */2505 /* Nothing to do: invoke the callback immediately */
2517G_GNUC_BEGIN_IGNORE_DEPRECATIONS2506 g_task_return_boolean (priv->store_task, TRUE);
2518 g_simple_async_result_complete_in_idle (priv->store_async_result);2507 g_clear_object (&priv->store_task);
2519G_GNUC_END_IGNORE_DEPRECATIONS
2520 g_clear_object (&priv->store_async_result);
2521 return;2508 return;
2522 }2509 }
25232510
2524 _ag_manager_store_async (priv->manager, account,2511 _ag_manager_store_async (priv->manager, account, priv->store_task);
2525 priv->store_async_result, cancellable);
2526}2512}
25272513
2528/**2514/**
@@ -2542,14 +2528,9 @@
2542ag_account_store_finish (AgAccount *account, GAsyncResult *res,2528ag_account_store_finish (AgAccount *account, GAsyncResult *res,
2543 GError **error)2529 GError **error)
2544{2530{
2545 GSimpleAsyncResult *async_result;
2546
2547 g_return_val_if_fail (AG_IS_ACCOUNT (account), FALSE);2531 g_return_val_if_fail (AG_IS_ACCOUNT (account), FALSE);
25482532
2549 async_result = (GSimpleAsyncResult *)res;2533 return g_task_propagate_boolean (G_TASK (res), error);
2550G_GNUC_BEGIN_IGNORE_DEPRECATIONS
2551 return !g_simple_async_result_propagate_error (async_result, error);
2552G_GNUC_END_IGNORE_DEPRECATIONS
2553}2534}
25542535
2555/**2536/**
25562537
=== modified file 'libaccounts-glib/ag-internals.h'
--- libaccounts-glib/ag-internals.h 2013-12-23 15:22:56 +0000
+++ libaccounts-glib/ag-internals.h 2016-05-20 08:55:52 +0000
@@ -4,7 +4,7 @@
4 * This file is part of libaccounts-glib4 * This file is part of libaccounts-glib
5 *5 *
6 * Copyright (C) 2009-2010 Nokia Corporation.6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2012-2013 Canonical Ltd.7 * Copyright (C) 2012-2016 Canonical Ltd.
8 * Copyright (C) 2012 Intel Corporation.8 * Copyright (C) 2012 Intel Corporation.
9 *9 *
10 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>10 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
@@ -95,8 +95,7 @@
95void _ag_manager_exec_transaction (AgManager *manager, const gchar *sql,95void _ag_manager_exec_transaction (AgManager *manager, const gchar *sql,
96 AgAccountChanges *changes,96 AgAccountChanges *changes,
97 AgAccount *account,97 AgAccount *account,
98 GSimpleAsyncResult *async_result,98 GTask *task);
99 GCancellable *cancellable);
10099
101typedef gboolean (*AgQueryCallback) (sqlite3_stmt *stmt, gpointer user_data);100typedef gboolean (*AgQueryCallback) (sqlite3_stmt *stmt, gpointer user_data);
102101
@@ -125,8 +124,7 @@
125124
126G_GNUC_INTERNAL125G_GNUC_INTERNAL
127void _ag_manager_store_async (AgManager *manager, AgAccount *account,126void _ag_manager_store_async (AgManager *manager, AgAccount *account,
128 GSimpleAsyncResult *async_result,127 GTask *task);
129 GCancellable *cancellable);
130G_GNUC_INTERNAL128G_GNUC_INTERNAL
131gboolean _ag_manager_store_sync (AgManager *manager, AgAccount *account,129gboolean _ag_manager_store_sync (AgManager *manager, AgAccount *account,
132 GError **error);130 GError **error);
133131
=== modified file 'libaccounts-glib/ag-manager.c'
--- libaccounts-glib/ag-manager.c 2016-02-18 19:37:45 +0000
+++ libaccounts-glib/ag-manager.c 2016-05-20 08:55:52 +0000
@@ -4,7 +4,7 @@
4 * This file is part of libaccounts-glib4 * This file is part of libaccounts-glib
5 *5 *
6 * Copyright (C) 2009-2010 Nokia Corporation.6 * Copyright (C) 2009-2010 Nokia Corporation.
7 * Copyright (C) 2012-2013 Canonical Ltd.7 * Copyright (C) 2012-2016 Canonical Ltd.
8 * Copyright (C) 2012 Intel Corporation.8 * Copyright (C) 2012 Intel Corporation.
9 *9 *
10 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>10 * Contact: Alberto Mardegan <alberto.mardegan@canonical.com>
@@ -148,8 +148,7 @@
148 gchar *sql;148 gchar *sql;
149 AgAccountChanges *changes;149 AgAccountChanges *changes;
150 guint id;150 guint id;
151 GSimpleAsyncResult *async_result;151 GTask *task;
152 GCancellable *cancellable;
153} StoreCbData;152} StoreCbData;
154153
155typedef struct {154typedef struct {
@@ -183,27 +182,23 @@
183 gpointer user_data)182 gpointer user_data)
184{183{
185 GDBusConnection *conn = G_DBUS_CONNECTION (object);184 GDBusConnection *conn = G_DBUS_CONNECTION (object);
186 GSimpleAsyncResult *async_result = user_data;185 GTask *task = user_data;
187 GVariant *result;186 GVariant *result;
188 GError *error_int = NULL;187 GError *error_int = NULL;
189188
190G_GNUC_BEGIN_IGNORE_DEPRECATIONS
191 result = g_dbus_connection_call_finish (conn, res, &error_int);189 result = g_dbus_connection_call_finish (conn, res, &error_int);
192 if (G_UNLIKELY (error_int))190 if (G_UNLIKELY (error_int))
193 {191 {
194 /* We always report a read-only error here */192 /* We always report a read-only error here */
195 GError error = {193 g_task_return_new_error (task,
196 AG_ACCOUNTS_ERROR,194 AG_ACCOUNTS_ERROR,
197 AG_ACCOUNTS_ERROR_READONLY,195 AG_ACCOUNTS_ERROR_READONLY,
198 error_int->message196 "%s", error_int->message);
199 };
200 g_simple_async_result_set_from_error (async_result, &error);
201 g_error_free (error_int);197 g_error_free (error_int);
202 }198 }
203 else199 else
204 {200 {
205 GObject *source =201 GObject *source = g_task_get_source_object (task);
206 g_async_result_get_source_object ((GAsyncResult *)async_result);
207 AgAccount *account = AG_ACCOUNT (source);202 AgAccount *account = AG_ACCOUNT (source);
208 /* If this was a new account, we must update the local data203 /* If this was a new account, we must update the local data
209 * structure */204 * structure */
@@ -213,42 +208,37 @@
213 AgAccountChanges *changes;208 AgAccountChanges *changes;
214209
215 g_variant_get_child (result, 0, "u", &account->id);210 g_variant_get_child (result, 0, "u", &account->id);
216 changes = g_object_get_data ((GObject *)async_result,211 changes = g_object_get_data ((GObject *)task,
217 key_remote_changes);212 key_remote_changes);
218 _ag_account_done_changes (account, changes);213 _ag_account_done_changes (account, changes);
219 }214 }
220 g_variant_unref (result);215 g_variant_unref (result);
216 g_task_return_boolean (task, TRUE);
221 }217 }
222218
223 g_simple_async_result_complete_in_idle (async_result);219 g_object_unref (task);
224 g_object_unref (async_result);
225G_GNUC_END_IGNORE_DEPRECATIONS
226}220}
227221
228static void222static void
229ag_manager_store_dbus_async (AgManager *manager, AgAccount *account,223ag_manager_store_dbus_async (AgManager *manager, AgAccount *account,
230 GSimpleAsyncResult *async_result,224 GTask *task)
231 GCancellable *cancellable)
232{225{
233 AgManagerPrivate *priv = manager->priv;226 AgManagerPrivate *priv = manager->priv;
234 AgAccountChanges *changes;227 AgAccountChanges *changes;
235 GVariant *dbus_changes;228 GVariant *dbus_changes;
236229
237 if (G_UNLIKELY (!priv->use_dbus)) {230 if (G_UNLIKELY (!priv->use_dbus)) {
238G_GNUC_BEGIN_IGNORE_DEPRECATIONS231 g_task_return_new_error (task,
239 g_simple_async_result_set_error (async_result,232 AG_ACCOUNTS_ERROR,
240 AG_ACCOUNTS_ERROR,233 AG_ACCOUNTS_ERROR_READONLY,
241 AG_ACCOUNTS_ERROR_READONLY,234 "DB read-only and D-Bus disabled");
242 "DB read-only and D-Bus disabled");235 g_object_unref (task);
243 g_simple_async_result_complete_in_idle (async_result);
244G_GNUC_END_IGNORE_DEPRECATIONS
245 g_object_unref (async_result);
246 return;236 return;
247 }237 }
248238
249 changes = _ag_account_steal_changes (account);239 changes = _ag_account_steal_changes (account);
250 dbus_changes = _ag_account_build_dbus_changes (account, changes, NULL);240 dbus_changes = _ag_account_build_dbus_changes (account, changes, NULL);
251 g_object_set_data_full ((GObject *)async_result,241 g_object_set_data_full ((GObject *)task,
252 key_remote_changes, changes,242 key_remote_changes, changes,
253 (GDestroyNotify) _ag_account_changes_free);243 (GDestroyNotify) _ag_account_changes_free);
254244
@@ -261,9 +251,9 @@
261 NULL,251 NULL,
262 G_DBUS_CALL_FLAGS_NONE,252 G_DBUS_CALL_FLAGS_NONE,
263 -1,253 -1,
264 cancellable,254 g_task_get_cancellable (task),
265 (GAsyncReadyCallback)on_dbus_store_done,255 (GAsyncReadyCallback)on_dbus_store_done,
266 async_result);256 task);
267}257}
268258
269static gboolean259static gboolean
@@ -1095,11 +1085,9 @@
1095 g_object_ref (account);1085 g_object_ref (account);
10961086
1097 /* If the operation was cancelled, abort it. */1087 /* If the operation was cancelled, abort it. */
1098 if (sd->cancellable != NULL)1088 if (g_task_return_error_if_cancelled (sd->task))
1099 {1089 {
1100 g_cancellable_set_error_if_cancelled (sd->cancellable, &error);1090 goto finish;
1101 if (error != NULL)
1102 goto finish;
1103 }1091 }
11041092
1105 g_return_val_if_fail (priv->begin_stmt != NULL, FALSE);1093 g_return_val_if_fail (priv->begin_stmt != NULL, FALSE);
@@ -1125,9 +1113,11 @@
1125finish:1113finish:
1126 if (error != NULL)1114 if (error != NULL)
1127 {1115 {
1128G_GNUC_BEGIN_IGNORE_DEPRECATIONS1116 g_task_return_error (sd->task, error);
1129 g_simple_async_result_take_error (sd->async_result, error);1117 }
1130G_GNUC_END_IGNORE_DEPRECATIONS1118 else
1119 {
1120 g_task_return_boolean (sd->task, TRUE);
1131 }1121 }
11321122
1133 _ag_account_store_completed (account, sd->changes);1123 _ag_account_store_completed (account, sd->changes);
@@ -2390,8 +2380,7 @@
2390void2380void
2391_ag_manager_exec_transaction (AgManager *manager, const gchar *sql,2381_ag_manager_exec_transaction (AgManager *manager, const gchar *sql,
2392 AgAccountChanges *changes, AgAccount *account,2382 AgAccountChanges *changes, AgAccount *account,
2393 GSimpleAsyncResult *async_result,2383 GTask *task)
2394 GCancellable *cancellable)
2395{2384{
2396 AgManagerPrivate *priv = manager->priv;2385 AgManagerPrivate *priv = manager->priv;
2397 GError *error = NULL;2386 GError *error = NULL;
@@ -2413,8 +2402,7 @@
2413 sd->manager = manager;2402 sd->manager = manager;
2414 sd->account = account;2403 sd->account = account;
2415 sd->changes = changes;2404 sd->changes = changes;
2416 sd->async_result = async_result;2405 sd->task = task;
2417 sd->cancellable = cancellable;
2418 sd->sql = g_strdup (sql);2406 sd->sql = g_strdup (sql);
2419 sd->id = g_idle_add ((GSourceFunc)exec_transaction_idle, sd);2407 sd->id = g_idle_add ((GSourceFunc)exec_transaction_idle, sd);
2420 priv->locks = g_list_prepend (priv->locks, sd);2408 priv->locks = g_list_prepend (priv->locks, sd);
@@ -2432,9 +2420,11 @@
2432finish:2420finish:
2433 if (error != NULL)2421 if (error != NULL)
2434 {2422 {
2435G_GNUC_BEGIN_IGNORE_DEPRECATIONS2423 g_task_return_error (task, error);
2436 g_simple_async_result_take_error (async_result, error);2424 }
2437G_GNUC_END_IGNORE_DEPRECATIONS2425 else
2426 {
2427 g_task_return_boolean (task, TRUE);
2438 }2428 }
24392429
2440 _ag_account_store_completed (account, changes);2430 _ag_account_store_completed (account, changes);
@@ -2485,8 +2475,7 @@
24852475
2486static void2476static void
2487ag_manager_store_local_async (AgManager *manager, AgAccount *account,2477ag_manager_store_local_async (AgManager *manager, AgAccount *account,
2488 GSimpleAsyncResult *async_result,2478 GTask *task)
2489 GCancellable *cancellable)
2490{2479{
2491 AgAccountChanges *changes;2480 AgAccountChanges *changes;
2492 GError *error = NULL;2481 GError *error = NULL;
@@ -2495,19 +2484,14 @@
2495 sql = _ag_account_get_store_sql (account, &error);2484 sql = _ag_account_get_store_sql (account, &error);
2496 if (G_UNLIKELY (error))2485 if (G_UNLIKELY (error))
2497 {2486 {
2498G_GNUC_BEGIN_IGNORE_DEPRECATIONS2487 g_task_return_error (task, error);
2499 g_simple_async_result_take_error (async_result,2488 g_object_unref (task);
2500 error);
2501 g_simple_async_result_complete_in_idle (async_result);
2502G_GNUC_END_IGNORE_DEPRECATIONS
2503 g_object_unref (async_result);
2504 return;2489 return;
2505 }2490 }
25062491
2507 changes = _ag_account_steal_changes (account);2492 changes = _ag_account_steal_changes (account);
25082493
2509 _ag_manager_exec_transaction (manager, sql, changes, account,2494 _ag_manager_exec_transaction (manager, sql, changes, account, task);
2510 async_result, cancellable);
2511 g_free (sql);2495 g_free (sql);
2512}2496}
25132497
@@ -2547,18 +2531,15 @@
25472531
2548void2532void
2549_ag_manager_store_async (AgManager *manager, AgAccount *account,2533_ag_manager_store_async (AgManager *manager, AgAccount *account,
2550 GSimpleAsyncResult *async_result,2534 GTask *task)
2551 GCancellable *cancellable)
2552{2535{
2553 if (manager->priv->is_readonly)2536 if (manager->priv->is_readonly)
2554 {2537 {
2555 ag_manager_store_dbus_async (manager, account, async_result,2538 ag_manager_store_dbus_async (manager, account, task);
2556 cancellable);
2557 }2539 }
2558 else2540 else
2559 {2541 {
2560 ag_manager_store_local_async (manager, account, async_result,2542 ag_manager_store_local_async (manager, account, task);
2561 cancellable);
2562 }2543 }
2563}2544}
25642545
25652546
=== modified file 'm4/gcov.m4'
--- m4/gcov.m4 2015-07-09 10:16:42 +0000
+++ m4/gcov.m4 2016-05-20 08:55:52 +0000
@@ -46,7 +46,7 @@
46 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])46 AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
47 fi47 fi
4848
49 lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11"49 lcov_version_list="1.6 1.7 1.8 1.9 1.10 1.11 1.12"
50 AC_CHECK_PROG(LCOV, lcov, lcov)50 AC_CHECK_PROG(LCOV, lcov, lcov)
51 AC_CHECK_PROG(GENHTML, genhtml, genhtml)51 AC_CHECK_PROG(GENHTML, genhtml, genhtml)
5252

Subscribers

No one subscribed via source and target branches