From: Christophe Massiot Date: Fri, 2 Sep 2005 17:11:23 +0000 (+0000) Subject: * modules/control/http/http.c: Added a small hack, when multiple http X-Git-Tag: 0.8.4~602 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=f302d243d74eebff2ed59d05001ddf1c922c7052;p=vlc * modules/control/http/http.c: Added a small hack, when multiple http control interfaces are specified, to automatically increment the port. --- diff --git a/modules/control/http/http.c b/modules/control/http/http.c index ed234728e0..f88114fa02 100644 --- a/modules/control/http/http.c +++ b/modules/control/http/http.c @@ -120,6 +120,7 @@ static int Open( vlc_object_t *p_this ) *psz_crl = NULL; int i_port = 0; char *psz_src; + char psz_tmp[10]; psz_address = config_GetPsz( p_intf, "http-host" ); if( psz_address != NULL ) @@ -249,6 +250,10 @@ static int Open( vlc_object_t *p_this ) 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 ); p_sys->p_httpd_host = httpd_TLSHostNew( VLC_OBJECT(p_intf), psz_address,