[evolution-ews] Use EEwsConnection as an argument for e_ews_soup_thread()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-ews] Use EEwsConnection as an argument for e_ews_soup_thread()
- Date: Tue, 10 Jul 2012 09:00:29 +0000 (UTC)
commit 2cf904e9081f058ee69d62d37b904797f160f0e6
Author: Milan Crha <mcrha redhat com>
Date: Tue Jul 10 11:00:14 2012 +0200
Use EEwsConnection as an argument for e_ews_soup_thread()
It's better for debugging, when checking backtraces, than cnc->priv.
src/server/e-ews-connection.c | 19 ++++++++++---------
1 files changed, 10 insertions(+), 9 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index af6a02f..bc8630d 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -965,7 +965,7 @@ e_ews_connection_dispose (GObject *object)
g_free (hash_key);
}
- g_signal_handlers_disconnect_by_func (priv->soup_session, ews_connection_authenticate, cnc);
+ g_signal_handlers_disconnect_by_func (priv->soup_session, ews_connection_authenticate, cnc);
if (priv->soup_session) {
g_main_loop_quit (priv->soup_loop);
@@ -1053,16 +1053,17 @@ e_ews_connection_class_init (EEwsConnectionClass *klass)
SOUP_TYPE_MESSAGE, SOUP_TYPE_AUTH, G_TYPE_BOOLEAN);
}
-static gpointer e_ews_soup_thread (gpointer user_data)
+static gpointer
+e_ews_soup_thread (gpointer user_data)
{
- EEwsConnectionPrivate *priv = user_data;
+ EEwsConnection *cnc = user_data;
- g_main_context_push_thread_default (priv->soup_context);
- g_main_loop_run (priv->soup_loop);
- g_main_context_pop_thread_default (priv->soup_context);
+ g_main_context_push_thread_default (cnc->priv->soup_context);
+ g_main_loop_run (cnc->priv->soup_loop);
+ g_main_context_pop_thread_default (cnc->priv->soup_context);
- g_object_unref (priv->soup_session);
- priv->soup_session = NULL;
+ g_object_unref (cnc->priv->soup_session);
+ cnc->priv->soup_session = NULL;
return NULL;
}
@@ -1079,7 +1080,7 @@ e_ews_connection_init (EEwsConnection *cnc)
priv->soup_context = g_main_context_new ();
priv->soup_loop = g_main_loop_new (priv->soup_context, FALSE);
- priv->soup_thread = g_thread_create (e_ews_soup_thread, priv, TRUE, NULL);
+ priv->soup_thread = g_thread_create (e_ews_soup_thread, cnc, TRUE, NULL);
/* create the SoupSession for this connection */
priv->soup_session = soup_session_async_new_with_options (SOUP_SESSION_USE_NTLM, TRUE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]