[gnome-online-accounts] ewsclient, httpclient: Stop using deprecated SoupSessionAsync



commit 6c3e3c2d2d9f688157513c0f0403645c4c196754
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Jan 9 15:59:28 2015 +0100

    ewsclient, httpclient: Stop using deprecated SoupSessionAsync
    
    As a result the minimum libsoup version was bumped to 2.42.
    
    Fixes: https://bugzilla.gnome.org/742651

 configure.ac                   |    2 +-
 src/goabackend/goaewsclient.c  |   14 +++++---------
 src/goabackend/goahttpclient.c |    8 ++------
 3 files changed, 8 insertions(+), 16 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 5de1391..dc39b07 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,7 +94,7 @@ PKG_CHECK_MODULES(WEBKIT_GTK, [webkitgtk-3.0 >= 2.1.90])
 AC_SUBST(WEBKIT_GTK_CFLAGS)
 AC_SUBST(WEBKIT_GTK_LIBS)
 
-PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.41])
+PKG_CHECK_MODULES(LIBSOUP, [libsoup-2.4 >= 2.42])
 AC_SUBST(LIBSOUP_CFLAGS)
 AC_SUBST(LIBSOUP_LIBS)
 
diff --git a/src/goabackend/goaewsclient.c b/src/goabackend/goaewsclient.c
index df95307..36e77ba 100644
--- a/src/goabackend/goaewsclient.c
+++ b/src/goabackend/goaewsclient.c
@@ -313,9 +313,8 @@ ews_client_autodiscover_response_cb (SoupSession *session, SoupMessage *msg, gpo
     {
       if (data->msgs[idx] != NULL)
         {
-          /* Since we are cancelling from the same thread that we queued the
-           * message, the callback (ie. this function) will be invoked before
-           * soup_session_cancel_message returns.
+          /* The callback (ie. this function) will be invoked after we
+           * have returned to the main loop.
            */
           soup_session_cancel_message (data->session, data->msgs[idx], SOUP_STATUS_CANCELLED);
         }
@@ -481,12 +480,9 @@ goa_ews_client_autodiscover (GoaEwsClient        *client,
   data->msgs[0] = ews_client_create_msg_for_url (url1, buf);
   data->msgs[1] = ews_client_create_msg_for_url (url2, buf);
   data->pending = sizeof (data->msgs) / sizeof (data->msgs[0]);
-  data->session = soup_session_async_new_with_options (SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
-                                                       SOUP_SESSION_SSL_STRICT, FALSE,
-                                                       SOUP_SESSION_USE_NTLM, TRUE,
-                                                       SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
-                                                       NULL);
-  soup_session_add_feature_by_type (data->session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
+  data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE,
+                                                 NULL);
+  soup_session_add_feature_by_type (data->session, SOUP_TYPE_AUTH_NTLM);
   data->accept_ssl_errors = accept_ssl_errors;
 
   if (cancellable != NULL)
diff --git a/src/goabackend/goahttpclient.c b/src/goabackend/goahttpclient.c
index 336f623..724d9c1 100644
--- a/src/goabackend/goahttpclient.c
+++ b/src/goabackend/goahttpclient.c
@@ -232,12 +232,8 @@ goa_http_client_check (GoaHttpClient       *client,
 
   data = g_slice_new0 (CheckData);
   data->res = g_simple_async_result_new (G_OBJECT (client), callback, user_data, goa_http_client_check);
-  data->session = soup_session_async_new_with_options (SOUP_SESSION_SSL_USE_SYSTEM_CA_FILE, TRUE,
-                                                       SOUP_SESSION_SSL_STRICT, FALSE,
-                                                       SOUP_SESSION_USE_THREAD_CONTEXT, TRUE,
-                                                       NULL);
-
-  soup_session_add_feature_by_type (data->session, SOUP_TYPE_PROXY_RESOLVER_DEFAULT);
+  data->session = soup_session_new_with_options (SOUP_SESSION_SSL_STRICT, FALSE,
+                                                 NULL);
 
   logger = soup_logger_new (SOUP_LOGGER_LOG_BODY, -1);
   soup_logger_set_printer (logger, http_client_log_printer, NULL, NULL);


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