[gnome-online-accounts/gnome-3-14] mail-auth: We want check_cancellable, not handle_cancellation



commit 600017f67320d9f1bbafbfd697383451165c4edd
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]