Commit 9237b0e4 authored by Pierre Ynard's avatar Pierre Ynard

http output: print warnings when setting the server address

(cherry picked from commit 03933a58ffe973ed91b0f9092fb3e5eafbfebbb0)
Signed-off-by: default avatarPierre Ynard <linkfanel@yahoo.fr>
parent 774c9875
...@@ -142,7 +142,6 @@ static int Open( vlc_object_t *p_this ) ...@@ -142,7 +142,6 @@ static int Open( vlc_object_t *p_this )
config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg ); config_ChainParse( p_access, SOUT_CFG_PREFIX, ppsz_sout_options, p_access->p_cfg );
const char *path = p_access->psz_path; const char *path = p_access->psz_path;
/* Skip everything before / - backward compatibiltiy with VLC 1.1 */
path += strcspn( path, "/" ); path += strcspn( path, "/" );
if( path > p_access->psz_path ) if( path > p_access->psz_path )
{ {
...@@ -152,10 +151,11 @@ static int Open( vlc_object_t *p_this ) ...@@ -152,10 +151,11 @@ static int Open( vlc_object_t *p_this )
if( port != p_access->psz_path ) if( port != p_access->psz_path )
{ {
int len = (port ? port : path) - p_access->psz_path; int len = (port ? port : path) - p_access->psz_path;
/* msg_Err( p_access, "\"%.*s\" HTTP host ignored", len, msg_Warn( p_access, "\"%.*s\" HTTP host might be ignored in "
p_access->psz_path ); "multiple-host configurations, use at your own risks.",
msg_Info( p_access, len, p_access->psz_path );
"Pass --http-host=IP on the command line instead." ); */ msg_Info( p_access, "Consider passing --http-host=IP on the "
"command line instead." );
char host[len + 1]; char host[len + 1];
strncpy( host, p_access->psz_path, len ); strncpy( host, p_access->psz_path, len );
...@@ -167,9 +167,9 @@ static int Open( vlc_object_t *p_this ) ...@@ -167,9 +167,9 @@ static int Open( vlc_object_t *p_this )
if( port != NULL ) if( port != NULL )
{ {
/* int len = path - ++port; /* int len = path - ++port;
msg_Err( p_access, "\"%.*s\" HTTP port ignored", len, port ); msg_Info( p_access, "Consider passing --%s-port=%.*s on the "
msg_Info( p_access, "Pass --%s-port=%.*s on the command line " "command line instead.",
"instead.", strcasecmp( p_access->psz_access, "https" ) strcasecmp( p_access->psz_access, "https" )
? "http" : "https", len, port ); */ ? "http" : "https", len, port ); */
port++; port++;
......
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