]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Make array of senders constant.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 7 Aug 2017 15:44:15 +0000 (17:44 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Mar 2018 02:28:10 +0000 (03:28 +0100)
commit0b786d977ded3c3922e851e5b8d60837b43469b9
tree2394409b85117b4da6efd84cf3da6a9cbef309a8
parentc1d48060c104aecc99175155309ff2bca32494ca
server: Make array of senders constant.

Currently we define an array of static non-constant sender structures
in vss.c with only ->init being initialized at compile time.
At startup the ->init method of each sender must fill out the other
function pointers of the structure. This approach is kind of pointless,
as these pointers are known at compile time and never change.

This patch changes the three senders to define a non-static constant
sender structure instead. The vss maintains an array of pointers to
these structures.

Since the new sender structures are non-static, they need to be
doxified. We use the opportunity to provide an overview of each sender.

The patch also introduces FOR_EACH_SENDER(), a macro which is used
several times to replace the open-coded loops we had before.
command.c
dccp_send.c
http_send.c
send.h
udp_send.c
vss.c