If the proxy configured method is AUTO but the PAC URL is not set yet,
returning service->proxy will give the correct method when WPAD failed.
if (service == NULL)
return CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN;
- if (service->proxy_config != CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN)
+ if (service->proxy_config != CONNMAN_SERVICE_PROXY_METHOD_UNKNOWN) {
+ if (service->proxy_config == CONNMAN_SERVICE_PROXY_METHOD_AUTO &&
+ service->pac == NULL)
+ return service->proxy;
+
return service->proxy_config;
+ }
return service->proxy;
}