Skip to content
Snippets Groups Projects
Commit e02146e9 authored by Pierre Lamot's avatar Pierre Lamot
Browse files

smb2: support browsing IPv6 nodes

  Url of items discovered when listing smb2 folders where ill-formed on IPv6
  hosts.
parent 9775ae34
No related branches found
No related tags found
No related merge requests found
......@@ -326,7 +326,10 @@ vlc_smb2_get_url(vlc_url_t *url, const char *file)
/* smb2://<psz_host><psz_path><file>?<psz_option> */
struct vlc_memstream buf;
vlc_memstream_open(&buf);
vlc_memstream_printf(&buf, "smb://%s", url->psz_host);
if (strchr(url->psz_host, ':') != NULL)
vlc_memstream_printf(&buf, "smb://[%s]", url->psz_host);
else
vlc_memstream_printf(&buf, "smb://%s", url->psz_host);
if (url->psz_path != NULL)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment