chiark / gitweb /
server/admin.h: Consolidate address construction during resolution.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 16 Sep 2017 16:06:41 +0000 (17:06 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 28 Jun 2018 23:26:40 +0000 (00:26 +0100)
commit8d513103f66617e96234d19813ab655ed9d5d13d
tree74656d56b8311d902655ae191441e8e730bb72ad
parent0451e0e42fbba844a4cd307f5a133b50d8f438f7
server/admin.h: Consolidate address construction during resolution.

Previously, setting up the socket address was kind of scattered
throughout the resolver code: the address family was set up front; the
port number stashed a bit later; and then the address plugged in once
the resolution job finished.

Instead, keep the port number separate once we've worked out what it is,
and build the entire socket address in one go at each site (once in the
background-resolver callback, and once for parsing a numerical address).
server/admin.c
server/tripe.h