Upgrading to GitLab 11.11.0.

Commit 07f13b1d authored by Debarshi Ray's avatar Debarshi Ray

ewsclient: Fix cancellation

Free the AutodiscoverData in an idle handler because soup_session_abort
invokes ews_client_autodiscover_response_cb. Trying to disconnect the
GCancellable from a 'cancelled' signal handler will result in a
deadlock.

Fixes: https://bugzilla.gnome.org/689642
parent c6400235
......@@ -88,9 +88,11 @@ typedef struct
gchar *username;
} AutodiscoverAuthData;
static void
ews_client_autodiscover_data_free (AutodiscoverData *data)
static gboolean
ews_client_autodiscover_data_free (gpointer user_data)
{
AutodiscoverData *data = user_data;
if (data->cancellable_id > 0)
{
g_cancellable_disconnect (data->cancellable, data->cancellable_id);
......@@ -102,6 +104,8 @@ ews_client_autodiscover_data_free (AutodiscoverData *data)
g_object_unref (data->res);
g_object_unref (data->session);
g_slice_free (AutodiscoverData, data);
return G_SOURCE_REMOVE;
}
static void
......@@ -312,7 +316,7 @@ ews_client_autodiscover_response_cb (SoupSession *session, SoupMessage *msg, gpo
g_simple_async_result_set_op_res_gboolean (data->res, op_res);
g_simple_async_result_complete_in_idle (data->res);
ews_client_autodiscover_data_free (data);
g_idle_add (ews_client_autodiscover_data_free, data);
}
static xmlDoc *
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment