If oFono sends IPv4 properties in different order, then we might
miss the index value.
---
 plugins/ofono.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/plugins/ofono.c b/plugins/ofono.c
index c5c1ed7..8a29d24 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -782,12 +782,11 @@ static void extract_ipv4_settings(DBusMessageIter *array,
 
                        DBG("Method %s", val);
 
-                       if (g_strcmp0(val, "static") == 0) {
+                       if (g_strcmp0(val, "static") == 0)
                                context->ipv4_method = 
CONNMAN_IPCONFIG_METHOD_FIXED;
-                       } else if (g_strcmp0(val, "dhcp") == 0) {
+                       else if (g_strcmp0(val, "dhcp") == 0)
                                context->ipv4_method = 
CONNMAN_IPCONFIG_METHOD_DHCP;
-                               break;
-                       }
+
                } else if (g_str_equal(key, "Address")) {
                        dbus_message_iter_get_basic(&value, &val);
 
-- 
1.8.3.1

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

Reply via email to