]> arthur.barton.de Git - netatalk.git/commit
cnid_metad: fix tsockfd_create() return value on error
authorJustin Maggard <jmaggard10@gmail.com>
Mon, 10 Nov 2014 23:28:17 +0000 (15:28 -0800)
committerRalph Boehme <slow@samba.org>
Tue, 11 Nov 2014 09:43:28 +0000 (10:43 +0100)
commit4b29d079dcb5d06eca960c6f517bfda05612eb79
treed747d56bda3794a4a273cf602d38ef369b35acb1
parent486aa5b3949e05ad386610339f2ff1fb7ab5116a
cnid_metad: fix tsockfd_create() return value on error

We ran into a case where the netatalk log grew at an extremely rapid
pace.  There was one message that kept repeating:

cnid_metad[2528] {usockfd.c:169} (E:CNID): error in accept: Socket
operation on non-socket

An strace showed pselect() getting called on stdin, rather than an
actual socket.  Looking at the code, I see that tsockfd_create() will
return 0 instead of -1 if the call to getaddrinfo() fails, which is
obviously wrong.

Reviewed-by: Ralph Boehme <slow@samba.org>
NEWS
etc/cnid_dbd/usockfd.c