diff mbox series

[v2,8/8] connection: Document '__connman_connection_update_gateway'.

Message ID 20231129192106.1295868-9-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series [v2,1/8] log: Refactor debugging preprocessor macros. | expand

Commit Message

Grant Erickson Nov. 29, 2023, 7:21 p.m. UTC
This adds documentation to the '__connman_connection_update_gateway'
function.
---
 src/connection.c | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)
diff mbox series

Patch

diff --git a/src/connection.c b/src/connection.c
index 58abf2ae1925..7c65b0951243 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -1320,6 +1320,24 @@  void __connman_connection_gateway_remove(struct connman_service *service,
 	}
 }
 
+/**
+ *  @brief
+ *    Handle a potential change in gateways.
+ *
+ *  This may be invoked by other modules in the event of service and
+ *  technology changes to reexamine and, if necessary, update active
+ *  network interface gateways and their associated routing table
+ *  entries.
+ *
+ *  @returns
+ *    True if an active gateway was updated; otherwise, false.
+ *
+ *  @sa __connman_connection_gateway_add
+ *  @sa __connman_connection_gateway_remove
+ *  @sa set_default_gateway
+ *  @sa unset_default_gateway
+ *
+ */
 bool __connman_connection_update_gateway(void)
 {
 	struct gateway_data *default_gateway;
@@ -1329,6 +1347,10 @@  bool __connman_connection_update_gateway(void)
 
 	DBG("");
 
+	/*
+	 * If there is no service-to-gateway data hash, then there is
+	 * nothing to update and do; simply return.
+	 */
 	if (!gateway_hash)
 		return updated;