diff mbox series

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

Message ID 20231128230847.1224497-9-gerickson@nuovations.com (mailing list archive)
State Not Applicable, archived
Headers show
Series connection: Improve Connection Gateway Debugging and Documentation | expand

Commit Message

Grant Erickson Nov. 28, 2023, 11:08 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 8208671d6986..75591a741ad4 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;