buffer_tree: Add code to splice out a node of the buffer tree.
[paraslash.git] / http_send.c
index 3959cad4f3b67326d6161a252c5b3a66a74e0394..6ededb275ac225d8a38d6ccbead967d53877fad4 100644 (file)
@@ -135,7 +135,7 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds)
        phsd->status = HTTP_CONNECTED;
 }
 
        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;
 
 {
        struct sender_client *sc, *tmp;
 
@@ -146,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);
                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);
        }
 }
 
        }
 }