HomeClusterLabs Projects
Diffusion Booth ae4d25f9d536

Refactor: setup_udp_server to no longer rely on global booth_conf var
ae4d25f9d536Unpublished

Unpublished Commit · Learn More

  • Repository Importing: This repository is still importing.
  • Not On Permanent Ref: This commit is not an ancestor of any permanent ref.

Description

Refactor: setup_udp_server to no longer rely on global booth_conf var

There's no real need since it's already carried in the "local" var[*]
carrying site data for what's resolved as a local site. Since it's
not a straightforward expression to pick up the port stored inside
SITE->[union: either sa4 or sa6 member], another inline getter moreover
not crashing on SITE being NULL was devised: site_port.

That helper is consequently applied also at other places that deal with
fetching port number -- antithetically, they used to fetch from said
booth_conf global variable while, at the same time, other connection
relevant information used to be fetched from whole another memory
object (said "local site" global). In effect, even more undesired
dependencies on booth_conf global were removed, in favour of unifying
the source of data at said "local site" one.

Also, insist on const-correctness with the sibling of added inline
function (so they look uniformly, the new one also follows that rule).

  • also global but that's not of interest for the time being

Signed-off-by: Jan Pokorný <jpokorny@redhat.com>

Details

Provenance
Jan Pokorný <jpokorny@redhat.com>Authored on Jan 20 2020, 12:23 PM
Parents
rB5b343e0ca962: Refactor: find_myself to no longer rely on global booth_conf variable
Branches
Unknown
Tags
Unknown

Event Timeline