Skip to content

connection: Refactor 'connection_newgateway'

Grant Erickson connman 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 1 replyIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4connection: Refactor 'connection_newgateway'.src/connection.c+55 -311 reply
2/4connection: Document 'check_default_gateway'.src/connection.c+20 -00 replies
3/4connection: Rename 'choose_default_gateway'.src/connection.c+43 -340 replies
4/4connection: Document 'yield_default_gateway'.src/connection.c+60 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/4] connection: Refactor 'connection_newgateway'

This refactors the body tail of 'connection_newgateway' into a new, separate function, 'check_default_gateway', shortening the length of the former and making the latter an individually auditable and comprehensible function.

In addition, this renames 'choose_default_gateway' as 'yield_default_gateway'. The latter more accurately reflects the action of the function which is determining which of two gateway data should cede or yield the default gateway and associated routes. The actual "choice" and acquisition of the default gateway and associated routes happens outside of the function.

Grant Erickson (4):
connection: Refactor 'connection_newgateway'.
connection: Document 'check_default_gateway'.
connection: Rename 'choose_default_gateway'.
connection: Document 'yield_default_gateway'.

 src/connection.c | 234 ++++++++++++++++++++++++++++++++++-------------
 1 file changed, 172 insertions(+), 62 deletions(-)
Signature · 1 line
2.42.0