Message ID | 1e6f26de75a331182bc2c426d5f35c19ed225ebe.1738976381.git.gerickson@nuovations.com (mailing list archive) |
---|---|
State | Superseded, archived |
Headers | show |
Series | ofono: Correct conditional in 'cm_get_contexts_reply'. | expand |
diff --git a/plugins/ofono.c b/plugins/ofono.c index 062905c8a3a6..6b89df3af0ae 100644 --- a/plugins/ofono.c +++ b/plugins/ofono.c @@ -1415,7 +1415,11 @@ static void cm_get_contexts_reply(DBusPendingCall *call, void *user_data) dbus_message_iter_next(&entry); dbus_message_iter_recurse(&entry, &value); - if (add_cm_context(modem, context_path, &value)) + /* + * If a context of type 'internet' is found, stop iterating; + * we have the desired context. + */ + if (add_cm_context(modem, context_path, &value) == 0) break; dbus_message_iter_next(&dict);