[vlc-commits] ftp: skip port number if it's the default
Rémi Denis-Courmont
git at videolan.org
Sun Jan 10 12:50:54 UTC 2021
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Sun Jan 10 14:07:09 2021 +0200| [48ad967a7ffff9879bf7385edea92d1cc46d7251] | committer: Rémi Denis-Courmont
ftp: skip port number if it's the default
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=48ad967a7ffff9879bf7385edea92d1cc46d7251
---
modules/access/ftp.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/modules/access/ftp.c b/modules/access/ftp.c
index d38815f782..f0157c66d5 100644
--- a/modules/access/ftp.c
+++ b/modules/access/ftp.c
@@ -980,7 +980,11 @@ static int DirRead (stream_t *p_access, input_item_node_t *p_current_node)
}
vlc_memstream_puts(&ms, "://");
vlc_memstream_puts(&ms, p_sys->url.psz_host);
- vlc_memstream_printf(&ms, ":%d", p_sys->url.i_port);
+
+ if (p_sys->url.i_port != ((p_sys->tlsmode != IMPLICIT) ? IPPORT_FTP
+ : IPPORT_FTPS))
+ vlc_memstream_printf(&ms, ":%d", p_sys->url.i_port);
+
if (p_sys->url.psz_path != NULL)
vlc_memstream_printf(&ms, "/%s", p_sys->url.psz_path);
vlc_memstream_puts(&ms, psz_filename);
More information about the vlc-commits
mailing list