[vlc-devel] [PATCH 1/2] vlc_url_t: Add a b_ipv6 field

Hugo Beauzée-Luyssen hugo at beauzee.fr
Mon May 23 13:59:05 CEST 2016


---
 include/vlc_url.h | 1 +
 src/text/url.c    | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/include/vlc_url.h b/include/vlc_url.h
index 4abe0da..166c11f 100644
--- a/include/vlc_url.h
+++ b/include/vlc_url.h
@@ -113,6 +113,7 @@ struct vlc_url_t
     char *psz_option;
 
     char *psz_buffer; /* to be freed */
+    bool b_ipv6;
 };
 
 VLC_API void vlc_UrlParse (vlc_url_t *, const char *);
diff --git a/src/text/url.c b/src/text/url.c
index 27db5e7..e482512 100644
--- a/src/text/url.c
+++ b/src/text/url.c
@@ -372,6 +372,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str)
     url->psz_path = NULL;
     url->psz_option = NULL;
     url->psz_buffer = NULL;
+    url->b_ipv6 = false;
 
     if (str == NULL)
         return;
@@ -443,6 +444,7 @@ void vlc_UrlParse (vlc_url_t *restrict url, const char *str)
     {   /* Try IPv6 numeral within brackets */
         *(next++) = '\0';
         url->psz_host = strdup (cur + 1);
+        url->b_ipv6 = true;
 
         if (*next == ':')
             next++;
-- 
2.8.1



More information about the vlc-devel mailing list