[gnome-online-accounts] owncloud: Don't use g_cancellable_reset



commit 4d3ee1677aa46f48936c37de6f65c1e80670057b
Author: Debarshi Ray <debarshir gnome org>
Date:   Wed Nov 22 12:19:27 2017 +0100

    owncloud: Don't use g_cancellable_reset

 src/goabackend/goaowncloudprovider.c |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/src/goabackend/goaowncloudprovider.c b/src/goabackend/goaowncloudprovider.c
index 546870b..eb4fee8 100644
--- a/src/goabackend/goaowncloudprovider.c
+++ b/src/goabackend/goaowncloudprovider.c
@@ -692,7 +692,10 @@ add_account (GoaProvider    *provider,
     goto out;
 
   uri_webdav = g_strconcat (uri, WEBDAV_ENDPOINT, NULL);
-  g_cancellable_reset (data.cancellable);
+
+  g_clear_object (&data.cancellable);
+  data.cancellable = g_cancellable_new ();
+
   goa_http_client_check (http_client,
                          uri_webdav,
                          username,
@@ -893,7 +896,10 @@ refresh_account (GoaProvider    *provider,
     username = gtk_entry_get_text (GTK_ENTRY (data.username));
 
   password = gtk_entry_get_text (GTK_ENTRY (data.password));
-  g_cancellable_reset (data.cancellable);
+
+  g_clear_object (&data.cancellable);
+  data.cancellable = g_cancellable_new ();
+
   goa_http_client_check (http_client,
                          uri_webdav,
                          username,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]