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

Grant Erickson <[email protected]>
Newsgroups dev.linux.lists.connman
Message-ID <466481561da0b9599007c43ece3fb362785581b6.1739403363.git.gerickson@nuovations.com>
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 --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;
-- 
2.45.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.