X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_send.c;fp=http_send.c;h=f53e6d8cc5100176cf54b19de057375eb4960cb8;hp=210f85ac63c9dd718a3f00e6a6e9790ffeeb5d96;hb=4fbe16430b4776814128d7110682c69d1b047c57;hpb=631fb4db2cea7bc44e91631957db8cd852fe75ee diff --git a/http_send.c b/http_send.c index 210f85ac..f53e6d8c 100644 --- a/http_send.c +++ b/http_send.c @@ -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))