summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-23 15:38:33 (GMT)
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-26 09:36:44 (GMT)
commit5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c (patch)
tree1c6376670d2333c581e0d886db23e05c65c659d0 /src
parente7680555f2b5fe7e2cfeaebe17ac61d87e7717f5 (diff)
downloadconnman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.zip
connman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.tar.gz
connman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.tar.bz2
dnsproxy: Return proper return code if listener_table is missing
The listener_table can be NULL if we have started connman with -r option. Because we return < 0 value to caller in this case, the caller, e.g. the tethering code, has a possibility to change its functionality, e.g. the tethering code can fall back to some other DNS servers.
Diffstat (limited to 'src')
-rw-r--r--src/dnsproxy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index 52d67d4..8ed34a7 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -3426,7 +3426,7 @@ int __connman_dnsproxy_add_listener(int index)
return -EINVAL;
if (listener_table == NULL)
- return 0;
+ return -ENOENT;
if (g_hash_table_lookup(listener_table, GINT_TO_POINTER(index)) != NULL)
return 0;