service: Changing default service was not correctly checked
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Thu, 19 Apr 2012 12:29:53 +0000 (15:29 +0300)
committerMarcel Holtmann <marcel@holtmann.org>
Thu, 19 Apr 2012 12:39:20 +0000 (14:39 +0200)
Let the default_changed() function check whether the default service is
really changed as it is doing it correctly every time.

The extra check in the __connman_service_indicate_default() function is
causing problems if the user is moving services around. Then we might be
using the old DNS service data because DNS code did not get information
that default service was changed.

Fixes BMC#25027

src/service.c

index a0e8a11..d14431a 100644 (file)
@@ -4662,12 +4662,7 @@ int __connman_service_clear_error(struct connman_service *service)
 
 int __connman_service_indicate_default(struct connman_service *service)
 {
-       struct connman_service *current = __connman_service_get_default();
-
-       DBG("service %p default %p", service, current);
-
-       if (current == service)
-               return 0;
+       DBG("service %p", service);
 
        default_changed();