[vlc-commits] httpd: remove constant httpd_client_t.i_ref

Rémi Denis-Courmont git at videolan.org
Sun Jun 17 20:13:17 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jun 17 21:04:58 2018 +0300| [9d5b27f356aba1b5d46b6cf418ce97f862ab6014] | committer: Rémi Denis-Courmont

httpd: remove constant httpd_client_t.i_ref

This was always zero.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d5b27f356aba1b5d46b6cf418ce97f862ab6014
---

 src/network/httpd.c | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/src/network/httpd.c b/src/network/httpd.c
index 2d0d32c2d9..71e725ef75 100644
--- a/src/network/httpd.c
+++ b/src/network/httpd.c
@@ -145,7 +145,6 @@ struct httpd_client_t
     vlc_tls_t   *sock;
 
     struct vlc_list node;
-    int     i_ref;
 
     bool    b_stream_mode;
     uint8_t i_state;
@@ -1218,7 +1217,6 @@ static httpd_client_t *httpd_ClientNew(vlc_tls_t *sock, mtime_t now)
 
     if (!cl) return NULL;
 
-    cl->i_ref   = 0;
     cl->sock    = sock;
     cl->url     = NULL;
 
@@ -1701,10 +1699,9 @@ static void httpdLoop(httpd_host_t *host)
     vlc_list_foreach(cl, &host->clients, node) {
         int64_t i_offset;
 
-        if (cl->i_ref < 0 || (cl->i_ref == 0 &&
-                    (cl->i_state == HTTPD_CLIENT_DEAD ||
-                      (cl->i_activity_timeout > 0 &&
-                        cl->i_activity_date+cl->i_activity_timeout < now)))) {
+        if (cl->i_state == HTTPD_CLIENT_DEAD
+         || (cl->i_activity_timeout > 0
+          && cl->i_activity_date + cl->i_activity_timeout < now)) {
             host->client_count--;
             httpd_ClientDestroy(cl);
             continue;



More information about the vlc-commits mailing list