]> arthur.barton.de Git - ngircd.git/commit
Fix handling of connection pool allocation and enlargement
authorAlexander Barton <alex@barton.de>
Wed, 18 Jan 2017 23:06:46 +0000 (00:06 +0100)
committerAlexander Barton <alex@barton.de>
Wed, 18 Jan 2017 23:06:46 +0000 (00:06 +0100)
commit879d5504081e09600464f503db8282e47f79abaa
treeae58564182e16550d2159ebd4b8779a2f1945d5b
parent2bb917f05aafaf526736d0b7ade2f330835bbbe1
Fix handling of connection pool allocation and enlargement

The daemon only enlarged its connection pool when accepting new client
connections, not when establishing new outgoing server links.

Thanks to Lukas Braun (k00mi) for reporting this!

In addition this patch streamlines the connection pool allocation, so
that there is only one place in the code allocating the pool: the now
updated Socket2Index() function. The name doesn't quite fit, but this
existing and today quite useless function (because the mapping from
socket number to connection index is 1:1 today) already became called
in almost all relevant code paths, so I decided to reuse it to keep the
patch small ...probably we want to fix the naming in a second patch?

Closes #231.
src/ngircd/conn.c