resolver: Do not try to update service if server is not set
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Mon, 14 May 2012 10:33:46 +0000 (13:33 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Tue, 15 May 2012 12:48:11 +0000 (15:48 +0300)
src/resolver.c

index f27f22c..58af2f7 100644 (file)
@@ -283,7 +283,7 @@ static int append_resolver(const char *interface, const char *domain,
                 * that are automagically added via netlink (lifetime > 0)
                 */
                index = connman_inet_ifindex(interface);
-               if (index >= 0) {
+               if (server != NULL && index >= 0) {
                        struct connman_service *service;
                        service = __connman_service_lookup_from_index(index);
                        if (service != NULL)