[frogr] Fixed bug changing from manual proxy to using the GNOME one



commit eb09e8a386061e25fcf7ff22ea894f1fa94b0ad1
Author: Mario Sanchez Prada <msanchez igalia com>
Date:   Wed Aug 3 16:46:05 2011 +0200

    Fixed bug changing from manual proxy to using the GNOME one

 src/flicksoup/fsp-session.c |   33 +++++++++++++++++----------------
 1 files changed, 17 insertions(+), 16 deletions(-)
---
diff --git a/src/flicksoup/fsp-session.c b/src/flicksoup/fsp-session.c
index d94c0b8..22afc5b 100644
--- a/src/flicksoup/fsp-session.c
+++ b/src/flicksoup/fsp-session.c
@@ -1352,26 +1352,27 @@ fsp_session_set_http_proxy              (FspSession *self,
           soup_uri_set_user (proxy_uri, actual_user);
           soup_uri_set_password (proxy_uri, actual_password);
         }
+    }
 
-      /* Set/unset the proxy if needed */
-      if ((!self->priv->proxy_uri && proxy_uri)
-          || (self->priv->proxy_uri && !proxy_uri)
-          || (self->priv->proxy_uri && proxy_uri && !soup_uri_equal (self->priv->proxy_uri, proxy_uri)))
-        {
-          g_object_set (G_OBJECT (self->priv->soup_session),
-                        SOUP_SESSION_PROXY_URI,
-                        proxy_uri,
-                        NULL);
+  /* Set/unset the proxy */
+  g_object_set (G_OBJECT (self->priv->soup_session),
+                SOUP_SESSION_PROXY_URI,
+                proxy_uri,
+                NULL);
 
-          /* Save internal reference to the proxy */
-          if (self->priv->proxy_uri)
-            soup_uri_free (self->priv->proxy_uri);
+  /* Update internal values if needed */
+  if ((!self->priv->proxy_uri && proxy_uri)
+      || (self->priv->proxy_uri && !proxy_uri)
+      || (self->priv->proxy_uri && proxy_uri && !soup_uri_equal (self->priv->proxy_uri, proxy_uri)))
+    {
+      /* Save internal reference to the proxy */
+      if (self->priv->proxy_uri)
+        soup_uri_free (self->priv->proxy_uri);
 
-          self->priv->proxy_uri = proxy_uri;
+      self->priv->proxy_uri = proxy_uri;
 
-          /* Proxy configuration actually changed */
-          return TRUE;
-        }
+      /* Proxy configuration actually changed */
+      return TRUE;
     }
 
 #ifdef HAVE_LIBSOUP_GNOME



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