server/: Split peer and admin initialization into smaller pieces.
authorMark Wooding <mdw@distorted.org.uk>
Sat, 12 May 2018 19:12:22 +0000 (20:12 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Fri, 25 Jan 2019 12:10:31 +0000 (12:10 +0000)
commit7737eb87d283d46b7a90caba20ac75c3214451d3
tree55292209cc3866dd2fd8f12374adb5925ceb50aa
parentf88b41d65f2284fb974b40ff5915db730f4bad55
server/: Split peer and admin initialization into smaller pieces.

Split admin initialization into:

  * setting up internal data structures, which is `a_init' as before;

  * establishing the daemonic signal handlers, which is now `a_signals';

  * creating the admin socket and listening for incoming connections,
    which is now `a_listen'; and

  * switching alert reporting over to admin clients rather than stderr,
    which is now `a_switcherr'.

Given that `a_listen' now need not actually be called, only unlink the
socket object if we actually created it.

Split peer initialization into:

  * setting up the data structures, which is `p_init' as before; and

  * creating the UDP sockets for communicating with other peers, which
    is now `p_bind'.

This will make sense in context.

squash! server/: Split peer and admin initialization into smaller pieces.

server/admin.c: Split out signal-handler establishment.
server/admin.c
server/peer.c
server/tripe.c
server/tripe.h