From: Daniel Wagner <[email protected]>

Things which should go into one of the other patches.
---
 src/dnsproxy.c |    3 +++
 src/ipconfig.c |   11 +++++++++++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/dnsproxy.c b/src/dnsproxy.c
index b7667a6..201c365 100644
--- a/src/dnsproxy.c
+++ b/src/dnsproxy.c
@@ -836,6 +836,9 @@ static void append_domain(const char *interface, const char 
*domain)
 
        DBG("interface %s domain %s", interface, domain);
 
+       if (domain == NULL)
+               return;
+
        for (list = server_list; list; list = list->next) {
                struct server_data *data = list->data;
                GList *dom_list;
diff --git a/src/ipconfig.c b/src/ipconfig.c
index 373e7ca..f806239 100644
--- a/src/ipconfig.c
+++ b/src/ipconfig.c
@@ -1827,6 +1827,17 @@ int __connman_ipconfig_save(struct connman_ipconfig 
*ipconfig,
        g_key_file_set_string(keyfile, identifier, key, method);
        g_free(key);
 
+       switch (ipconfig->method) {
+       case CONNMAN_IPCONFIG_METHOD_FIXED:
+       case CONNMAN_IPCONFIG_METHOD_MANUAL:
+               break;
+       case CONNMAN_IPCONFIG_METHOD_UNKNOWN:
+       case CONNMAN_IPCONFIG_METHOD_OFF:
+       case CONNMAN_IPCONFIG_METHOD_DHCP:
+       case CONNMAN_IPCONFIG_METHOD_AUTO:
+               return 0;
+       }
+
        key = g_strdup_printf("%snetmask_prefixlen", prefix);
        g_key_file_set_integer(keyfile, identifier,
                        key, ipconfig->address->prefixlen);
-- 
1.7.3.5

_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman

Reply via email to