]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - http_send.c
Intoduce send_common.c and use it from the dccp sender.
[paraslash.git] / http_send.c
index 8f834f70a7ef7f32325c6474ef4f43e4e929ebea..b629d9579ea02854176cb2d5ff0174ab42313a59 100644 (file)
@@ -18,8 +18,8 @@
 #include "server.h"
 #include "http.h"
 #include "vss.h"
-#include "send.h"
 #include "list.h"
+#include "send.h"
 #include "close_on_fork.h"
 #include "net.h"
 #include "fd.h"
@@ -57,8 +57,6 @@ struct http_client {
        char *name;
        /** The client's current status. */
        enum http_status status;
-       /** Non-zero if we included \a fd in the read set.*/
-       int check_r;
        /** The position of this client in the client list. */
        struct list_head node;
        /** non-zero if audio file header has been sent */
@@ -211,7 +209,7 @@ static void http_post_select(fd_set *rfds, __a_unused fd_set *wfds)
                case HTTP_STREAMING: /* nothing to do */
                        break;
                case HTTP_CONNECTED: /* need to recv get request */
-                       if (hc->check_r && FD_ISSET(hc->fd, rfds)) {
+                       if (FD_ISSET(hc->fd, rfds)) {
                                if (recv_pattern(hc->fd, HTTP_GET_MSG, MAXLINE)
                                                < 0) {
                                        hc->status = HTTP_INVALID_GET_REQUEST;
@@ -281,7 +279,6 @@ static void http_pre_select(int *max_fileno, fd_set *rfds, __a_unused fd_set *wf
        para_fd_set(listen_fd, rfds, max_fileno);
        list_for_each_entry_safe(hc, tmp, &clients, node) {
                //PARA_DEBUG_LOG("hc %p on fd %d: status %d\n", hc, hc->fd, hc->status);
-               hc->check_r = 0;
                switch (hc->status) {
                case HTTP_STREAMING:
                case HTTP_GOT_GET_REQUEST: /* need to send ok msg */
@@ -289,7 +286,6 @@ static void http_pre_select(int *max_fileno, fd_set *rfds, __a_unused fd_set *wf
                        break;
                case HTTP_CONNECTED: /* need to recv get request */
                        para_fd_set(hc->fd, rfds, max_fileno);
-                       hc->check_r = 1;
                        break;
                }
        }