[Goodies-commits] r6697 - in gigolo/trunk: . src

Enrico Troeger enrico at xfce.org
Mon Feb 16 14:00:55 CET 2009


Author: enrico
Date: 2009-02-16 13:00:55 +0000 (Mon, 16 Feb 2009)
New Revision: 6697

Modified:
   gigolo/trunk/ChangeLog
   gigolo/trunk/src/bookmark.c
Log:
Don't strip the square brackets when parsing Obex URIs to prevent storing invalid URIs.

Modified: gigolo/trunk/ChangeLog
===================================================================
--- gigolo/trunk/ChangeLog	2009-02-16 08:56:24 UTC (rev 6696)
+++ gigolo/trunk/ChangeLog	2009-02-16 13:00:55 UTC (rev 6697)
@@ -1,3 +1,10 @@
+2009-02-16  Enrico Tröger  <enrico(at)xfce(dot)org>
+
+ * src/bookmarks.c:
+   Don't strip the square brackets when parsing Obex URIs to prevent
+   storing invalid URIs.
+
+
 2009-02-13  Enrico Tröger  <enrico(at)xfce(dot)org>
 
  * src/preferencesdialog.c:

Modified: gigolo/trunk/src/bookmark.c
===================================================================
--- gigolo/trunk/src/bookmark.c	2009-02-16 08:56:24 UTC (rev 6696)
+++ gigolo/trunk/src/bookmark.c	2009-02-16 13:00:55 UTC (rev 6697)
@@ -146,7 +146,7 @@
 	s = (t) ? t + 1 : s;
 	if (*s == '[') /* obex://[00:12:D1:94:1B:28]/ or http://[1080:0:0:0:8:800:200C:417A]/index.html */
 	{
-		gchar *hostend;
+		gchar *hostend, *tmp;
 
 		s++; /* skip the found '[' */
 		hostend = strchr(s, ']');
@@ -163,7 +163,9 @@
 			l++; /* count the len of the hostname */
 			x++;
 		}
-		priv->host = g_strndup(s, l);
+		tmp = g_strndup(s, l);
+		priv->host = g_strconcat("[", tmp, "]", NULL);
+		g_free(tmp);
 		s = hostend;
 	}
 	else




More information about the Goodies-commits mailing list