[gvfs] Use complete_with_cancellable() in file enumerator



commit 5af6a1dbdd2c6a61b515a5bd64350db3af16dae7
Author: Benjamin Otte <otte redhat com>
Date:   Mon Mar 29 15:50:41 2010 +0200

    Use complete_with_cancellable() in file enumerator
    
    This makes sure we always return ERROR_CANCELLED, just like we want to
    guarantee and avoids crashes in the file chooser.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=614099

 client/gdaemonfileenumerator.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/client/gdaemonfileenumerator.c b/client/gdaemonfileenumerator.c
index be27545..77b7ec4 100644
--- a/client/gdaemonfileenumerator.c
+++ b/client/gdaemonfileenumerator.c
@@ -276,9 +276,10 @@ trigger_async_done (GDaemonFileEnumerator *daemon, gboolean ok)
 						 (GDestroyNotify)free_info_list);
     }
 
-  g_simple_async_result_complete_in_idle (daemon->async_res);
+  _g_simple_async_result_complete_with_cancellable (daemon->async_res,
+                                                    daemon->async_cancel);
   
-  daemon->async_cancel = 0;
+  daemon->async_cancel = NULL;
   daemon->cancelled_tag = 0;
 
   if (daemon->timeout_tag != 0)
@@ -549,7 +550,7 @@ g_daemon_file_enumerator_close_async (GFileEnumerator      *enumerator,
 
   res = g_simple_async_result_new (G_OBJECT (enumerator), callback, user_data,
 				   g_daemon_file_enumerator_close_async);
-  g_simple_async_result_complete_in_idle (res);
+  _g_simple_async_result_complete_with_cancellable (res, cancellable);
   g_object_unref (res);
 }
 



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