mbox series

[0/4] connection: Refactor 'connection_newgateway'

Message ID 20231129073947.1280705-1-gerickson@nuovations.com (mailing list archive)
Headers show
Series connection: Refactor 'connection_newgateway' | expand

Message

Grant Erickson Nov. 29, 2023, 7:39 a.m. UTC
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(-)