Make autoconf-2.66 happy.
[paraslash.git] / http_send.c
index 8ebbbc9c8a676d52f7b78348af10333ed6ec9dea..0c48934aea55747fa9e24e9393b903d0b4754263 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2008 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -41,7 +41,9 @@ enum http_client_status {
        HTTP_INVALID_GET_REQUEST
 };
 
+/** For each connected client, a structure of this type is maintained. */
 struct private_http_sender_data {
+       /** The current state of this client. */
        enum http_client_status status;
 };
 
@@ -131,7 +133,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;
 
@@ -142,6 +144,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);
        }
 }