X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_send.c;h=f53e6d8cc5100176cf54b19de057375eb4960cb8;hp=d692c2d2f3b741f093775bd983d84100bb741644;hb=4fbe16430b4776814128d7110682c69d1b047c57;hpb=2b004fc5dc0c652c6eb4daf84e5875f2c852ca72 diff --git a/http_send.c b/http_send.c index d692c2d2..f53e6d8c 100644 --- a/http_send.c +++ b/http_send.c @@ -16,6 +16,7 @@ #include "error.h" #include "string.h" #include "afh.h" +#include "net.h" #include "server.h" #include "http.h" #include "list.h" @@ -23,7 +24,6 @@ #include "sched.h" #include "vss.h" #include "close_on_fork.h" -#include "net.h" #include "fd.h" #include "chunk_queue.h" #include "acl.h" @@ -193,10 +193,13 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds) static void http_pre_select(int *max_fileno, fd_set *rfds, fd_set *wfds) { struct sender_client *sc, *tmp; + unsigned n; - if (hss->listen_fd < 0) - return; - para_fd_set(hss->listen_fd, rfds, max_fileno); + FOR_EACH_LISTEN_FD(n, hss) { + if (hss->listen_fds[n] < 0) + continue; + para_fd_set(hss->listen_fds[n], rfds, max_fileno); + } list_for_each_entry_safe(sc, tmp, &hss->client_list, node) { struct private_http_sender_data *phsd = sc->private_data; if (phsd->status == HTTP_CONNECTED) /* need to recv get request */ @@ -261,6 +264,7 @@ void http_send_init(struct sender *s) s->client_cmds[SENDER_delete] = NULL; init_sender_status(hss, OPT_RESULT(HTTP_ACCESS), + OPT_RESULT(HTTP_LISTEN_ADDRESS), OPT_UINT32_VAL(HTTP_PORT), OPT_UINT32_VAL(HTTP_MAX_CLIENTS), OPT_GIVEN(HTTP_DEFAULT_DENY)); if (OPT_GIVEN(HTTP_NO_AUTOSTART))