diff options
author | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-12 23:40:30 +0100 |
---|---|---|
committer | Samuel Ortiz <sameo@linux.intel.com> | 2011-01-13 00:37:21 +0100 |
commit | 8a34f9a741a6e5229b9763488d40f7fb1252f3ee (patch) | |
tree | d10d76cc0cea88a88b11b17109a58718296df37c /src/wpad.c | |
parent | bbfb775f74d23aa4870dfd32cba6cb272cf45cee (diff) | |
download | connman-8a34f9a741a6e5229b9763488d40f7fb1252f3ee.tar.gz connman-8a34f9a741a6e5229b9763488d40f7fb1252f3ee.tar.bz2 connman-8a34f9a741a6e5229b9763488d40f7fb1252f3ee.zip |
service: Return DIRECT proxy if wpad_start fails
Diffstat (limited to 'src/wpad.c')
-rw-r--r-- | src/wpad.c | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -114,7 +114,7 @@ failed: CONNMAN_SERVICE_PROXY_METHOD_DIRECT); } -void __connman_wpad_start(struct connman_service *service) +int __connman_wpad_start(struct connman_service *service) { struct connman_wpad *wpad; const char *domainname, *nameserver; @@ -123,29 +123,29 @@ void __connman_wpad_start(struct connman_service *service) DBG("service %p", service); if (wpad_list == NULL) - return; + return -EINVAL; index = __connman_service_get_index(service); if (index < 0) - return; + return -EINVAL; domainname = connman_service_get_domainname(service); if (domainname == NULL) - return; + return -EINVAL; nameserver = connman_service_get_nameserver(service); if (nameserver == NULL) - return; + return -EINVAL; wpad = g_try_new0(struct connman_wpad, 1); if (wpad == NULL) - return; + return -ENOMEM; wpad->service = service; wpad->resolv = g_resolv_new(index); if (wpad->resolv == NULL) { g_free(wpad); - return; + return -ENOMEM; } if (getenv("CONNMAN_RESOLV_DEBUG")) @@ -161,6 +161,8 @@ void __connman_wpad_start(struct connman_service *service) wpad_result, wpad); g_hash_table_replace(wpad_list, GINT_TO_POINTER(index), wpad); + + return 0; } void __connman_wpad_stop(struct connman_service *service) |