diff mbox series

[3/4] ofono: Documentation: Add comment about entry condition for 'context_changed'.

Message ID 466481561da0b9599007c43ece3fb362785581b6.1739403363.git.gerickson@nuovations.com (mailing list archive)
State Accepted
Commit 00e7dc2d528f6d5cf5cc1061c38861b91ae69eff
Headers show
Series ofono: Make the oFono Plugin Modem Interface Order Tolerant | expand

Commit Message

Grant Erickson Feb. 12, 2025, 11:39 p.m. UTC
Adds a comment to the head of 'context_changed' detailing why the
early exit condition exists: changed cellular contexts cannot be
processed before they are added.
---
 plugins/ofono.c | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox series

Patch

diff --git a/plugins/ofono.c b/plugins/ofono.c
index b7a5f80bda5c..820299765c67 100644
--- a/plugins/ofono.c
+++ b/plugins/ofono.c
@@ -1304,6 +1304,12 @@  static gboolean context_changed(DBusConnection *conn,
 
 	DBG("context_path %s", context_path);
 
+	/*
+	 * If there is no modem in the context hash for the associated
+	 * context path, then there is nothing to do at the moment as
+	 * the context must first be added before we can process changes
+	 * to it.
+	 */
 	modem = g_hash_table_lookup(context_hash, context_path);
 	if (!modem)
 		return TRUE;