From cbbf2c8ba131066dd6f2f2e724e59bcde0fd23ae Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sat, 2 Feb 2008 14:30:11 +0100 Subject: [PATCH] http_send.c: Kill check_r member from struct http_client. It was set to one if and only if the client is in state HTTP_CONNECTED. --- http_send.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/http_send.c b/http_send.c index 8f834f70..2646ebb8 100644 --- a/http_send.c +++ b/http_send.c @@ -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; } } -- 2.39.5