Message ID | 7a05bc1060f2aaba362f8198cdd4f1c7d2ff04e9.1739203086.git.gerickson@nuovations.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 28a7ce1595a188705b6fc8e613932a187ab266db |
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);