Since the existing ipconfig is updated only when the new settings are
properly formatted, it is enough to simply return the error if updating
fails.
---
 src/service.c |    8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/src/service.c b/src/service.c
index 9e79b03..96cb7c0 100644
--- a/src/service.c
+++ b/src/service.c
@@ -3298,14 +3298,8 @@ static DBusMessage *set_property(DBusConnection *conn,
                err = __connman_service_reset_ipconfig(service, type, &value,
                                                                &state);
 
-               if (err < 0) {
-                       if (is_connected_state(service, state) ||
-                                       is_connecting_state(service, state))
-                               __connman_network_set_ipconfig(service->network,
-                                               service->ipconfig_ipv4,
-                                               service->ipconfig_ipv6);
+               if (err < 0)
                        return __connman_error_failed(msg, -err);
-               }
 
                if (type == CONNMAN_IPCONFIG_TYPE_IPV4)
                        ipv4_configuration_changed(service);
-- 
1.7.10.4

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

Reply via email to