[PATCHv3 spice-gtk 02/14] proxy: split uri with : in only 2 parts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We want just host:port here.
---
 gtk/spice-proxy.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/gtk/spice-proxy.c b/gtk/spice-proxy.c
index bc4037e..f338213 100644
--- a/gtk/spice-proxy.c
+++ b/gtk/spice-proxy.c
@@ -74,7 +74,8 @@ gboolean spice_proxy_parse(SpiceProxy *self, const gchar *proxyuri, GError **err
     spice_proxy_set_protocol(self, "http");
     spice_proxy_set_port(self, 3128);
 
-    gchar **proxyv = g_strsplit(uri, ":", 0);
+    /* max 2 parts, host:port */
+    gchar **proxyv = g_strsplit(uri, ":", 2);
     const gchar *proxy_port = NULL;
 
     if (proxyv[0] == NULL || strlen(proxyv[0]) == 0) {
-- 
1.8.4.2

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]