wispr: Set gweb debug at the right place
authorTomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Wed, 2 May 2012 13:46:06 +0000 (16:46 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Fri, 4 May 2012 08:09:22 +0000 (11:09 +0300)
src/wispr.c

index f44a21a..0815330 100644 (file)
@@ -726,9 +726,6 @@ static void proxy_callback(const char *proxy, void *user_data)
 
        wp_context->token = 0;
 
-       if (getenv("CONNMAN_WEB_DEBUG"))
-               g_web_set_debug(wp_context->web, web_debug, "WEB");
-
        if (proxy != NULL && g_strcmp0(proxy, "DIRECT") != 0)
                g_web_set_proxy(wp_context->web, proxy);
 
@@ -809,6 +806,9 @@ static int wispr_portal_detect(struct connman_wispr_portal_context *wp_context)
                goto done;
        }
 
+       if (getenv("CONNMAN_WEB_DEBUG"))
+               g_web_set_debug(wp_context->web, web_debug, "WEB");
+
        if (wp_context->type == CONNMAN_IPCONFIG_TYPE_IPV4) {
                g_web_set_address_family(wp_context->web, AF_INET);
                wp_context->status_url = STATUS_URL_IPV4;