diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-05-13 21:29:38 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-05-13 21:40:23 +0800 |
commit | 53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23 (patch) | |
tree | f4cdd57586ad4bd1af4669a429af0938e8d6e845 /e-util/e-file-request.c | |
parent | 89777f0726a0127daddd593c8a28384204cb7aaf (diff) | |
download | gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.gz gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.tar.zst gsoc2013-evolution-53a3d2f4e1473dd93fee8e7367bc329b8dc5ef23.zip |
Use g_simple_async_result_set_check_cancellable().
Always call it immediately after g_simple_async_result_new().
Diffstat (limited to 'e-util/e-file-request.c')
-rw-r--r-- | e-util/e-file-request.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/e-util/e-file-request.c b/e-util/e-file-request.c index 62c64e34a8..08d8682261 100644 --- a/e-util/e-file-request.c +++ b/e-util/e-file-request.c @@ -93,7 +93,7 @@ file_request_send_async (SoupRequest *request, GAsyncReadyCallback callback, gpointer user_data) { - GSimpleAsyncResult *result; + GSimpleAsyncResult *simple; d(printf("received request for %s\n", soup_uri_to_string (uri, FALSE))); @@ -102,10 +102,15 @@ file_request_send_async (SoupRequest *request, * which WebKit thinks it's remote, but in fact it behaves like * oridnary file:// */ - result = g_simple_async_result_new (G_OBJECT (request), callback, - user_data, file_request_send_async); - g_simple_async_result_run_in_thread (result, handle_file_request, - G_PRIORITY_DEFAULT, cancellable); + simple = g_simple_async_result_new ( + G_OBJECT (request), callback, user_data, + file_request_send_async); + + g_simple_async_result_set_check_cancellable (simple, cancellable); + + g_simple_async_result_run_in_thread ( + simple, handle_file_request, + G_PRIORITY_DEFAULT, cancellable); } static GInputStream * |