summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJukka Rissanen <jukka.rissanen@linux.intel.com>2013-04-23 18:38:33 +0300
committerPatrik Flykt <patrik.flykt@linux.intel.com>2013-04-26 12:36:44 +0300
commit5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c (patch)
tree1c6376670d2333c581e0d886db23e05c65c659d0 /src
parente7680555f2b5fe7e2cfeaebe17ac61d87e7717f5 (diff)
downloadconnman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.tar.gz
connman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.tar.bz2
connman-5641eea3a2f3c699e8f93b1a21dc1d8aac6db92c.zip
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 52d67d4a..8ed34a7a 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;