[vlc-devel] [PATCH] upnp: Correct top directory url formatting
Steve Lhomme
robux4 at ycbcr.xyz
Thu Nov 19 07:36:21 CET 2020
LGTM
On 2020-11-18 19:32, dev.asenat at posteo.net wrote:
> From: Alaric Senat <dev.asenat at posteo.net>
>
> As pointed out in #25055 the choice of url option delimiter is probably
> meant to be that way. std::string.find() returns std::string::npos (aka
> -1) in case of no match.
> ---
> modules/services_discovery/upnp.cpp | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/modules/services_discovery/upnp.cpp b/modules/services_discovery/upnp.cpp
> index 054a5d1910..a249e3b4d2 100644
> --- a/modules/services_discovery/upnp.cpp
> +++ b/modules/services_discovery/upnp.cpp
> @@ -407,7 +407,7 @@ bool MediaServerList::addServer( MediaServerDesc* desc )
> } else {
> char* psz_mrl;
> // We might already have some options specified in the location.
> - char opt_delim = desc->location.find( '?' ) == 0 ? '?' : '&';
> + char opt_delim = desc->location.find( '?' ) == std::string::npos ? '?' : '&';
> if( asprintf( &psz_mrl, "upnp://%s%cObjectID=0", desc->location.c_str(), opt_delim ) < 0 )
> return false;
>
> --
> 2.26.2
>
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
>
More information about the vlc-devel
mailing list