aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-http-request.c15
-rw-r--r--mail/e-mail-request.c15
2 files changed, 20 insertions, 10 deletions
diff --git a/mail/e-http-request.c b/mail/e-http-request.c
index a8417efb95..edf13152df 100644
--- a/mail/e-http-request.c
+++ b/mail/e-http-request.c
@@ -430,7 +430,7 @@ http_request_send_async (SoupRequest *request,
gpointer user_data)
{
EHTTPRequest *ehr;
- GSimpleAsyncResult *result;
+ GSimpleAsyncResult *simple;
gchar *mail_uri;
SoupURI *uri;
const gchar *enc;
@@ -464,10 +464,15 @@ http_request_send_async (SoupRequest *request,
/* Make sure the formatter lives until we are finished here */
g_object_ref (ehr->priv->efh);
- result = g_simple_async_result_new (G_OBJECT (request), callback,
- user_data, http_request_send_async);
- g_simple_async_result_run_in_thread (result, handle_http_request,
- G_PRIORITY_DEFAULT, cancellable);
+ simple = g_simple_async_result_new (
+ G_OBJECT (request), callback,
+ user_data, http_request_send_async);
+
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
+
+ g_simple_async_result_run_in_thread (
+ simple, handle_http_request,
+ G_PRIORITY_DEFAULT, cancellable);
g_hash_table_destroy (query);
}
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c
index 8a51b2a226..d36e0cba2e 100644
--- a/mail/e-mail-request.c
+++ b/mail/e-mail-request.c
@@ -180,7 +180,7 @@ mail_request_send_async (SoupRequest *request,
{
SoupSession *session;
EMailRequest *emr = E_MAIL_REQUEST (request);
- GSimpleAsyncResult *result;
+ GSimpleAsyncResult *simple;
SoupURI *uri;
GHashTable *formatters;
gchar *uri_str;
@@ -209,10 +209,15 @@ mail_request_send_async (SoupRequest *request,
/* Make sure the formatter lives until we are finished here */
g_object_ref (emr->priv->efh);
- result = g_simple_async_result_new (G_OBJECT (request), callback,
- user_data, mail_request_send_async);
- g_simple_async_result_run_in_thread (result, handle_mail_request,
- G_PRIORITY_DEFAULT, cancellable);
+ simple = g_simple_async_result_new (
+ G_OBJECT (request), callback,
+ user_data, mail_request_send_async);
+
+ g_simple_async_result_set_check_cancellable (simple, cancellable);
+
+ g_simple_async_result_run_in_thread (
+ simple, handle_mail_request,
+ G_PRIORITY_DEFAULT, cancellable);
}
static GInputStream *