service: Do not set the service state when changing IPv4 method
authorJukka Rissanen <jukka.rissanen@linux.intel.com>
Tue, 7 Aug 2012 14:08:40 +0000 (17:08 +0300)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Wed, 8 Aug 2012 12:57:43 +0000 (15:57 +0300)
The service state will be set to proper state if we are
actually doing the connection so do not set the state
when we are just setting the IPv4 method.

src/service.c

index abd429c..e4c13dc 100644 (file)
@@ -2943,8 +2943,7 @@ static int set_ipconfig(struct connman_service *service,
        if (type == CONNMAN_IPCONFIG_TYPE_IPV4) {
                if (err == 0 && old_method == CONNMAN_IPCONFIG_METHOD_OFF &&
                                method == CONNMAN_IPCONFIG_METHOD_DHCP) {
-                       *new_state = service->state_ipv4 =
-                               CONNMAN_SERVICE_STATE_CONFIGURATION;
+                       *new_state = service->state_ipv4;
                        __connman_ipconfig_enable(ipconfig);
                }