[gnome-online-accounts/gnome-3-16] mail-auth: We want check_cancellable, not handle_cancellation
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-16] mail-auth: We want check_cancellable, not handle_cancellation
- Date: Thu, 26 Nov 2015 13:11:41 +0000 (UTC)
commit 9674b0f0421c67089bd2378130a8b6c1652649ea
Author: Debarshi Ray <debarshir gnome org>
Date: Thu Nov 19 18:57:52 2015 +0100
mail-auth: We want check_cancellable, not handle_cancellation
This is a school boy mistake. We want to use
g_simple_async_result_set_check_cancellable to check the state of the
GCancellable before dispatching results, not the unrelated
g_simple_async_result_set_handle_cancellation.
https://bugzilla.gnome.org/show_bug.cgi?id=758361
src/goabackend/goamailauth.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goamailauth.c b/src/goabackend/goamailauth.c
index db8570d..14bee82 100644
--- a/src/goabackend/goamailauth.c
+++ b/src/goabackend/goamailauth.c
@@ -220,7 +220,7 @@ goa_mail_auth_run (GoaMailAuth *self,
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
simple = g_simple_async_result_new (G_OBJECT (self), callback, user_data, goa_mail_auth_run);
- g_simple_async_result_set_handle_cancellation (simple, TRUE);
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
g_simple_async_result_run_in_thread (simple, mail_auth_run_in_thread_func, G_PRIORITY_DEFAULT,
cancellable);
@@ -271,7 +271,7 @@ goa_mail_auth_starttls (GoaMailAuth *self,
g_return_if_fail (cancellable == NULL || G_IS_CANCELLABLE (cancellable));
simple = g_simple_async_result_new (G_OBJECT (self), callback, user_data, goa_mail_auth_starttls);
- g_simple_async_result_set_handle_cancellation (simple, TRUE);
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
g_simple_async_result_run_in_thread (simple,
mail_auth_starttls_in_thread_func,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]