Commit f302d243 authored by Christophe Massiot's avatar Christophe Massiot

* modules/control/http/http.c: Added a small hack, when multiple http

   control interfaces are specified, to automatically increment the port.
parent 12d99c68
...@@ -120,6 +120,7 @@ static int Open( vlc_object_t *p_this ) ...@@ -120,6 +120,7 @@ static int Open( vlc_object_t *p_this )
*psz_crl = NULL; *psz_crl = NULL;
int i_port = 0; int i_port = 0;
char *psz_src; char *psz_src;
char psz_tmp[10];
psz_address = config_GetPsz( p_intf, "http-host" ); psz_address = config_GetPsz( p_intf, "http-host" );
if( psz_address != NULL ) if( psz_address != NULL )
...@@ -249,6 +250,10 @@ static int Open( vlc_object_t *p_this ) ...@@ -249,6 +250,10 @@ static int Open( vlc_object_t *p_this )
i_port= 8080; i_port= 8080;
} }
/* Ugly hack to allow to run several HTTP servers on different ports. */
sprintf( psz_tmp, ":%d", i_port + 1 );
config_PutPsz( p_intf, "http-host", psz_tmp );
msg_Dbg( p_intf, "base %s:%d", psz_address, i_port ); msg_Dbg( p_intf, "base %s:%d", psz_address, i_port );
p_sys->p_httpd_host = httpd_TLSHostNew( VLC_OBJECT(p_intf), psz_address, p_sys->p_httpd_host = httpd_TLSHostNew( VLC_OBJECT(p_intf), psz_address,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment