<html><head></head><body>Beurk. It is much more logical and concise to name a node in a list a node.<br>
<br>
No thanks.<br><br><div class="gmail_quote">Le 17 août 2018 16:04:41 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">---<br> src/network/httpd.c | 38 +++++++++++++++++++-------------------<br> 1 file changed, 19 insertions(+), 19 deletions(-)<br><br>diff --git a/src/network/httpd.c b/src/network/httpd.c<br>index 1eff0dc0bd..2147c0eae7 100644<br>--- a/src/network/httpd.c<br>+++ b/src/network/httpd.c<br>@@ -76,7 +76,7 @@ static void httpd_AppendData(httpd_stream_t *stream, uint8_t *p_data, int i_data<br> struct httpd_host_t<br> {<br> struct vlc_common_members obj;<br>- vlc_list_node node; /* from list httpd.hosts */<br>+ vlc_list_node hosts_item; /* from list httpd.hosts */<br> <br> /* ref count */<br> atomic_uint ref;<br>@@ -94,10 +94,10 @@ struct httpd_host_t<br> * This will slow down the url research but make my live easier<br> * All url will have their cb trigger, but only the first one can answer<br> * */<br>- struct vlc_list urls; /* intrusive in httpd_url_t.node */<br>+ struct vlc_list urls; /* intrusive in httpd_url_t.urls_item */<br> <br> size_t client_count;<br>- struct vlc_list clients; /* intrusive in httpd_url_t.httpd_client_t */<br>+ struct vlc_list clients; /* intrusive in httpd_url_t.clients_item */<br> <br> /* TLS data */<br> vlc_tls_creds_t *p_tls;<br>@@ -107,7 +107,7 @@ struct httpd_host_t<br> struct httpd_url_t<br> {<br> httpd_host_t *host;<br>- vlc_list_node node; /* from list httpd_host_t.urls */<br>+ vlc_list_node urls_item; /* from list httpd_host_t.urls */<br> vlc_mutex_t lock;<br> <br> char *psz_url;<br>@@ -143,7 +143,7 @@ struct httpd_client_t<br> httpd_url_t *url;<br> vlc_tls_t *sock;<br> <br>- vlc_list_node node; /* from list httpd_host_t.clients */<br>+ vlc_list_node clients_item; /* from list httpd_host_t.clients */<br> <br> bool b_stream_mode;<br> uint8_t i_state;<br>@@ -901,7 +901,7 @@ httpd_host_t *vlc_rtsp_HostNew(vlc_object_t *p_this)<br> static struct httpd<br> {<br> vlc_mutex_t mutex;<br>- struct vlc_list hosts; /* intrusive in httpd_host_t.node */<br>+ struct vlc_list hosts; /* intrusive in httpd_host_t.hosts_item */<br> } httpd = { VLC_STATIC_MUTEX, VLC_LIST_INITIALIZER(&httpd.hosts) };<br> <br> static httpd_host_t *httpd_HostCreate(vlc_object_t *p_this,<br>@@ -916,7 +916,7 @@ static httpd_host_t *httpd_HostCreate(vlc_object_t *p_this,<br> vlc_mutex_lock(&httpd.mutex);<br> <br> /* verify if it already exist */<br>- vlc_list_foreach(host, &httpd.hosts, node) {<br>+ vlc_list_foreach(host, &httpd.hosts, hosts_item) {<br> /* cannot mix TLS and non-TLS hosts */<br> if (host->port != port<br> || (host->p_tls != NULL) != (p_tls != NULL))<br>@@ -965,7 +965,7 @@ static httpd_host_t *httpd_HostCreate(vlc_object_t *p_this,<br> }<br> <br> /* now add it to httpd */<br>- vlc_list_append(&host->node, &httpd.hosts);<br>+ vlc_list_append(&host->hosts_item, &httpd.hosts);<br> vlc_mutex_unlock(&httpd.mutex);<br> <br> return host;<br>@@ -998,13 +998,13 @@ void httpd_HostDelete(httpd_host_t *host)<br> return;<br> }<br> <br>- vlc_list_remove(&host->node);<br>+ vlc_list_remove(&host->hosts_item);<br> vlc_cancel(host->thread);<br> vlc_join(host->thread, NULL);<br> <br> msg_Dbg(host, "HTTP host removed");<br> <br>- vlc_list_foreach(client, &host->clients, node) {<br>+ vlc_list_foreach(client, &host->clients, clients_item) {<br> msg_Warn(host, "client still connected");<br> httpd_ClientDestroy(client);<br> }<br>@@ -1027,7 +1027,7 @@ httpd_url_t *httpd_UrlNew(httpd_host_t *host, const char *psz_url,<br> assert(psz_url);<br> <br> vlc_mutex_lock(&host->lock);<br>- vlc_list_foreach(url, &host->urls, node)<br>+ vlc_list_foreach(url, &host->urls, urls_item)<br> if (!strcmp(psz_url, url->psz_url)) {<br> msg_Warn(host, "cannot add '%s' (url already defined)", psz_url);<br> vlc_mutex_unlock(&host->lock);<br>@@ -1051,7 +1051,7 @@ httpd_url_t *httpd_UrlNew(httpd_host_t *host, const char *psz_url,<br> url->catch[i].p_sys = NULL;<br> }<br> <br>- vlc_list_append(&url->node, &host->urls);<br>+ vlc_list_append(&url->urls_item, &host->urls);<br> vlc_cond_signal(&host->wait);<br> vlc_mutex_unlock(&host->lock);<br> <br>@@ -1077,14 +1077,14 @@ void httpd_UrlDelete(httpd_url_t *url)<br> httpd_client_t *client;<br> <br> vlc_mutex_lock(&host->lock);<br>- vlc_list_remove(&url->node);<br>+ vlc_list_remove(&url->urls_item);<br> <br> vlc_mutex_destroy(&url->lock);<br> free(url->psz_url);<br> free(url->psz_user);<br> free(url->psz_password);<br> <br>- vlc_list_foreach(client, &host->clients, node) {<br>+ vlc_list_foreach(client, &host->clients, clients_item) {<br> if (client->url != url)<br> continue;<br> <br>@@ -1193,7 +1193,7 @@ char* httpd_ServerIP(const httpd_client_t *cl, char *ip, int *port)<br> <br> static void httpd_ClientDestroy(httpd_client_t *cl)<br> {<br>- vlc_list_remove(&cl->node);<br>+ vlc_list_remove(&cl->clients_item);<br> vlc_tls_Close(cl->sock);<br> httpd_MsgClean(&cl->answer);<br> httpd_MsgClean(&cl->query);<br>@@ -1690,7 +1690,7 @@ static void httpdLoop(httpd_host_t *host)<br> httpd_client_t *cl;<br> <br> int canc = vlc_savecancel();<br>- vlc_list_foreach(cl, &host->clients, node) {<br>+ vlc_list_foreach(cl, &host->clients, clients_item) {<br> int64_t i_offset;<br> <br> if (cl->i_state == HTTPD_CLIENT_DEAD<br>@@ -1804,7 +1804,7 @@ static void httpdLoop(httpd_host_t *host)<br> bool b_auth_failed = false;<br> <br> /* Search the url and trigger callbacks */<br>- vlc_list_foreach(url, &host->urls, node) {<br>+ vlc_list_foreach(url, &host->urls, urls_item) {<br> if (strcmp(url->psz_url, query->psz_url))<br> continue;<br> if (!url->catch[i_msg].cb)<br>@@ -1948,7 +1948,7 @@ static void httpdLoop(httpd_host_t *host)<br> now = vlc_tick_now();<br> nfd = host->nfd;<br> <br>- vlc_list_foreach(cl, &host->clients, node) {<br>+ vlc_list_foreach(cl, &host->clients, clients_item) {<br> const struct pollfd *pufd = &ufd[nfd];<br> <br> assert(pufd < &ufd[sizeof(ufd) / sizeof(ufd[0])]);<br>@@ -2014,7 +2014,7 @@ static void httpdLoop(httpd_host_t *host)<br> cl->i_state = HTTPD_CLIENT_TLS_HS_OUT;<br> <br> host->client_count++;<br>- vlc_list_append(&cl->node, &host->clients);<br>+ vlc_list_append(&cl->clients_item, &host->clients);<br> }<br> <br> vlc_mutex_unlock(&host->lock);</pre></blockquote></div><br>
-- <br>
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>