[libsoup/wip/tpopela/negotiate] soup-auth-negotiate: Try to get the realm after initializing the client



commit 245836149bed191a1380fbf49ad9ab28a7c33dc7
Author: Tomas Popela <tpopela redhat com>
Date:   Tue Feb 23 17:25:34 2016 +0100

    soup-auth-negotiate: Try to get the realm after initializing the client

 libsoup/soup-auth-negotiate.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
---
diff --git a/libsoup/soup-auth-negotiate.c b/libsoup/soup-auth-negotiate.c
index ef721b5..dd64905 100644
--- a/libsoup/soup-auth-negotiate.c
+++ b/libsoup/soup-auth-negotiate.c
@@ -429,13 +429,14 @@ soup_gss_build_response (SoupNegotiateConnectionState *conn, SoupAuth *auth, GEr
 {
        if (!conn->initialized) {
                gchar *realm = NULL;
+
+               if (!soup_gss_client_init (conn, soup_auth_get_host (auth), err))
+                       return FALSE;
+
                if ((realm = soup_gss_client_get_realm (auth, NULL))) {
                        g_object_set (G_OBJECT (auth), SOUP_AUTH_REALM, realm, NULL);
                        g_free (realm);
                }
-
-               if (!soup_gss_client_init (conn, soup_auth_get_host (auth), err))
-                       return FALSE;
        }
 
        if (soup_gss_client_step (conn, "", err) != AUTH_GSS_CONTINUE)


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