X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=http_send.c;h=6ededb275ac225d8a38d6ccbead967d53877fad4;hp=feb1a84233ee67ff03e537c97f14cc0d9abb44e8;hb=1e012cf40238883621692051a22fb9c7cad5e944;hpb=03d45daad787b8f2ced3070e80c4550bf4b02931 diff --git a/http_send.c b/http_send.c index feb1a842..6ededb27 100644 --- a/http_send.c +++ b/http_send.c @@ -6,6 +6,7 @@ /** \file http_send.c paraslash's http sender */ +#include #include #include #include @@ -134,7 +135,7 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds) phsd->status = HTTP_CONNECTED; } -static void http_pre_select(int *max_fileno, 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; @@ -145,6 +146,9 @@ static void http_pre_select(int *max_fileno, fd_set *rfds, __a_unused fd_set *wf struct private_http_sender_data *phsd = sc->private_data; if (phsd->status == HTTP_CONNECTED) /* need to recv get request */ para_fd_set(sc->fd, rfds, max_fileno); + if (phsd->status == HTTP_GOT_GET_REQUEST || + phsd->status == HTTP_INVALID_GET_REQUEST) + para_fd_set(sc->fd, wfds, max_fileno); } }