X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=send_common.c;h=227a3eb8469714dfd2e4c067fb06c2809ec94a81;hb=181beb316afad036ac01a778544c5dec0a8d51c7;hp=9debdfca5a40a7ada404e9cf4a034140e2509a6b;hpb=73a77d2b8293081f7bda2838242935bd74aebbe0;p=paraslash.git diff --git a/send_common.c b/send_common.c index 9debdfca..227a3eb8 100644 --- a/send_common.c +++ b/send_common.c @@ -44,12 +44,12 @@ */ void shutdown_client(struct sender_client *sc, struct sender_status *ss) { - PARA_INFO_LOG("shutting down %s on fd %d\n", sc->name, sc->fd); - free(sc->name); if (!process_is_command_handler()) { + PARA_INFO_LOG("shutting down %s on fd %d\n", sc->name, sc->fd); close(sc->fd); del_close_on_fork_list(sc->fd); } + free(sc->name); cq_destroy(sc->cq); list_del(&sc->node); free(sc->private_data); @@ -343,7 +343,6 @@ void generic_com_off(struct sender_status *ss) * Accept a connection on the socket(s) this server is listening on. * * \param ss The sender whose listening fd is ready for reading. - * \param rfds Passed to para_accept(), * * This accepts incoming connections on any of the listening sockets of the * server. If there is a connection pending, the function @@ -367,7 +366,7 @@ void generic_com_off(struct sender_status *ss) * \sa \ref para_accept(), \ref mark_fd_nonblocking(), \ref acl_check_access(), * \ref cq_new(), \ref add_close_on_fork_list(). */ -struct sender_client *accept_sender_client(struct sender_status *ss, fd_set *rfds) +struct sender_client *accept_sender_client(struct sender_status *ss) { struct sender_client *sc; int fd, ret; @@ -376,7 +375,7 @@ struct sender_client *accept_sender_client(struct sender_status *ss, fd_set *rfd FOR_EACH_LISTEN_FD(n, ss) { if (ss->listen_fds[n] < 0) continue; - ret = para_accept(ss->listen_fds[n], rfds, NULL, 0, &fd); + ret = para_accept(ss->listen_fds[n], NULL, 0, &fd); if (ret < 0) goto warn; if (ret == 0)