/* address/port and socket for listening at connections */
int *fds;
unsigned nfd;
+ unsigned port;
vlc_thread_t thread;
vlc_mutex_t lock;
vlc_tls_creds_t *p_tls )
{
httpd_host_t *host;
+ unsigned port = var_InheritInteger( p_this->p_libvlc, portvar );
/* to be sure to avoid multiple creation */
vlc_mutex_lock( &httpd.mutex );
host = httpd.host[i];
/* cannot mix TLS and non-TLS hosts */
- if( ( host->p_tls != NULL ) != ( p_tls != NULL ) )
+ if( host->port != port
+ || (host->p_tls != NULL) != (p_tls != NULL) )
continue;
/* Increase existing matching host reference count.
host->i_ref = 1;
char *hostname = var_InheritString( p_this->p_libvlc, hostvar );
- int port = var_InheritInteger( p_this->p_libvlc, portvar );
host->fds = net_ListenTCP( p_this, hostname, port );
free( hostname );
if( host->fds == NULL )
goto error;
}
+ host->port = port;
host->i_url = 0;
host->url = NULL;
host->i_client = 0;