[vlc-commits] oldrc: Accept backward compatible hosts
Hugo Beauzée-Luyssen
git at videolan.org
Wed Feb 28 17:53:35 CET 2018
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Wed Feb 28 14:49:43 2018 +0100| [8c1c9a4322809ccf6b159ed6e5a4fe1e14000272] | committer: Hugo Beauzée-Luyssen
oldrc: Accept backward compatible hosts
Fix #19871
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8c1c9a4322809ccf6b159ed6e5a4fe1e14000272
---
modules/control/oldrc.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/modules/control/oldrc.c b/modules/control/oldrc.c
index ef38c2d5e2..0460f7fa5c 100644
--- a/modules/control/oldrc.c
+++ b/modules/control/oldrc.c
@@ -304,6 +304,19 @@ static int Activate( vlc_object_t *p_this )
vlc_url_t url;
vlc_UrlParse( &url, psz_host );
+ if( url.psz_host == NULL )
+ {
+ vlc_UrlClean( &url );
+ char *psz_backward_compat_host;
+ if( asprintf( &psz_backward_compat_host, "//%s", psz_host ) < 0 )
+ {
+ free( psz_host );
+ return VLC_EGENERIC;
+ }
+ free( psz_host );
+ psz_host = psz_backward_compat_host;
+ vlc_UrlParse( &url, psz_host );
+ }
msg_Dbg( p_intf, "base: %s, port: %d", url.psz_host, url.i_port );
More information about the vlc-commits
mailing list