]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Fix brown paper bag bug in generic_com_on().
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Apr 2018 18:59:59 +0000 (20:59 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 30 Apr 2018 19:08:07 +0000 (21:08 +0200)
Due to this bug an the wrong integer is stored in ->listen_fd,
resulting in errors of the form

Apr 30 20:56:15 (4) (31884) accept_sender_client: Socket operation on non-socket

Fixes: ac9f8fc0b4a20 (send_common: Combine generic_com_on() and
open_sender()) from one month ago.

send_common.c

index 5a9ddf641796931e70accd1fa1ae3a74bfbff57d..16820a5380395fabd841287448108a346a2fb4ca 100644 (file)
@@ -236,7 +236,7 @@ void generic_com_on(struct sender_status *ss, unsigned protocol)
                return;
        }
        add_close_on_fork_list(fd);
-       ss->listen_fd = ret;
+       ss->listen_fd = fd;
        return;
 }