ConnMan network manager
 help / color / mirror / Atom feed
From: Grant Erickson <gerickson@nuovations.com>
To: connman@lists.linux.dev
Subject: [PATCH 0/4] connection: Refactor 'connection_newgateway'
Date: Tue, 28 Nov 2023 23:39:42 -0800	[thread overview]
Message-ID: <20231129073947.1280705-1-gerickson@nuovations.com> (raw)

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(-)

-- 
2.42.0


             reply	other threads:[~2023-11-29  7:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29  7:39 Grant Erickson [this message]
2023-11-29  7:39 ` [PATCH 1/4] connection: Refactor 'connection_newgateway' Grant Erickson
2023-11-29 13:23   ` Marcel Holtmann
2023-11-29  7:39 ` [PATCH 2/4] connection: Document 'check_default_gateway' Grant Erickson
2023-11-29  7:39 ` [PATCH 3/4] connection: Rename 'choose_default_gateway' Grant Erickson
2023-11-29  7:39 ` [PATCH 4/4] connection: Document 'yield_default_gateway' Grant Erickson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231129073947.1280705-1-gerickson@nuovations.com \
    --to=gerickson@nuovations.com \
    --cc=connman@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).