[vlc-devel] [PATCH] Accept port specifications in smb2, now that the underlying library supports them.

Thomas Guillem thomas at gllm.fr
Mon Jun 3 13:55:43 CEST 2019


Hello,

OK for me. Thanks for the patch.

On Mon, Jun 3, 2019, at 13:31, Michael Young wrote:
> ---
>  modules/access/smb2.c | 10 ++--------
>  1 file changed, 2 insertions(+), 8 deletions(-)
> 
> diff --git a/modules/access/smb2.c b/modules/access/smb2.c
> index 41864ccfa8..7374956dea 100644
> --- a/modules/access/smb2.c
> +++ b/modules/access/smb2.c
> @@ -58,8 +58,6 @@
>  
>  #include "smb_common.h"
>  
> -#define CIFS_PORT 445
> -
>  static int Open(vlc_object_t *);
>  static void Close(vlc_object_t *);
>  
> @@ -583,10 +581,6 @@ Open(vlc_object_t *p_obj)
>      if (vlc_UrlParseFixup(&sys->encoded_url, access->psz_url) != 0)
>          return VLC_ENOMEM;
>  
> -    if (sys->encoded_url.i_port != 0 && sys->encoded_url.i_port != CIFS_PORT)
> -        goto error;
> -    sys->encoded_url.i_port = 0;
> -
>      sys->smb2 = smb2_init_context();
>      if (sys->smb2 == NULL)
>      {
> @@ -598,10 +592,10 @@ Open(vlc_object_t *p_obj)
>          sys->encoded_url.psz_path = (char *) "/";
>  
>      char *resolved_host = vlc_smb2_resolve(access, sys->encoded_url.psz_host,
> -                                           CIFS_PORT);
> +                                           sys->encoded_url.i_port);
>  
>      /* smb2_* functions need a decoded url. Re compose the url from the
> -     * modified sys->encoded_url (without port and with the resolved host). */
> +     * modified sys->encoded_url (with the resolved host). */
>      char *url;
>      if (resolved_host != NULL)
>      {
> -- 
> 2.17.1
> 
> _______________________________________________
> 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