[vlc-commits] smb2: support browsing files when running on a non standard port
Pierre Lamot
git at videolan.org
Wed Jun 3 12:06:58 CEST 2020
vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Fri May 29 10:22:47 2020 +0200| [b967d0a028f138c8d10aa7b0ce8d865691b6855e] | committer: Pierre Lamot
smb2: support browsing files when running on a non standard port
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b967d0a028f138c8d10aa7b0ce8d865691b6855e
---
modules/access/smb2.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/modules/access/smb2.c b/modules/access/smb2.c
index c98c66a857..5e73d3a7cc 100644
--- a/modules/access/smb2.c
+++ b/modules/access/smb2.c
@@ -323,7 +323,7 @@ FileControl(stream_t *access, int i_query, va_list args)
static char *
vlc_smb2_get_url(vlc_url_t *url, const char *file)
{
- /* smb2://<psz_host><psz_path><file>?<psz_option> */
+ /* smb2://<psz_host><i_port><psz_path><file>?<psz_option> */
struct vlc_memstream buf;
vlc_memstream_open(&buf);
if (strchr(url->psz_host, ':') != NULL)
@@ -331,6 +331,9 @@ vlc_smb2_get_url(vlc_url_t *url, const char *file)
else
vlc_memstream_printf(&buf, "smb://%s", url->psz_host);
+ if (url->i_port != 0)
+ vlc_memstream_printf(&buf, ":%d", url->i_port);
+
if (url->psz_path != NULL)
{
vlc_memstream_puts(&buf, url->psz_path);
More information about the vlc-commits
mailing list