[vlc-commits] smb2: accept port specifications
Michael Young
git at videolan.org
Tue Aug 6 12:09:04 CEST 2019
vlc | branch: master | Michael Young <mwy-cpjbvr at the-youngs.org> | Mon Jun 3 07:30:52 2019 -0400| [08c83ec287b6daa9aa4b2421f758ceccacad966a] | committer: Thomas Guillem
smb2: accept port specifications
Since the underlying library supports them (since 3.0.0).
Signed-off-by: Thomas Guillem <thomas at gllm.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=08c83ec287b6daa9aa4b2421f758ceccacad966a
---
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 932a5f8f0b..66adc28fa3 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 *);
@@ -584,10 +582,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)
{
@@ -599,10 +593,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)
{
More information about the vlc-commits
mailing list