]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
http_send.c: Kill check_r member from struct http_client.
authorAndre Noll <maan@systemlinux.org>
Sat, 2 Feb 2008 13:30:11 +0000 (14:30 +0100)
committerAndre Noll <maan@systemlinux.org>
Sat, 2 Feb 2008 13:30:11 +0000 (14:30 +0100)
It was set to one if and only if the client is in state
HTTP_CONNECTED.

http_send.c

index 8f834f70a7ef7f32325c6474ef4f43e4e929ebea..2646ebb8f7973ae72cbeb1b85e7ddccbd989b172 100644 (file)
@@ -57,8 +57,6 @@ struct http_client {
        char *name;
        /** The client's current status. */
        enum http_status status;
        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 */
        /** 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 */
                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;
                                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);
        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 */
                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);
                        break;
                case HTTP_CONNECTED: /* need to recv get request */
                        para_fd_set(hc->fd, rfds, max_fileno);
-                       hc->check_r = 1;
                        break;
                }
        }
                        break;
                }
        }