# HG changeset patch
# User renatofilho
# Date 1176413668 -3600
# Node ID d6f9b041734693e8b4405d4bee7732a4b8c2396f
# Parent  c67cec9e60737a8157a34bc709697de79d8c1cd6
[svn r545] fixed parse

diff -r c67cec9e6073 -r d6f9b0417346 gmyth-stream/libgnomevfs2/modules/gmythstream-method.c
--- a/gmyth-stream/libgnomevfs2/modules/gmythstream-method.c	Thu Apr 12 22:16:55 2007 +0100
+++ b/gmyth-stream/libgnomevfs2/modules/gmythstream-method.c	Thu Apr 12 22:34:28 2007 +0100
@@ -176,7 +176,6 @@
 
 	file = gnome_vfs_unescape_string (uri_str, "");
 	c = file;
-	//skip "/"
 	entry = g_string_new ("");
 	c = c + 1;
 	do {
@@ -184,14 +183,14 @@
 			open = !open;
 		}
 
-		if (((*c == '?') || (c + 1 == '\0')) && !open) {
+		if (((*c == '?') || (c[1] == '\0')) && !open) {
+			if (*c != '?')
+				g_string_append_c (entry, *c);
+
 			args = g_slist_append (args, g_strdup (entry->str));
 			entry = g_string_assign (entry, "");
 		} else {
-			if (*c == '#')
-				g_string_append (entry, "//");
-			else
-				g_string_append_c (entry, *c);
+			g_string_append_c (entry, *c);
 		}
 		c = c + 1;
 	} while (*c != '\0');
@@ -202,6 +201,7 @@
     {
 		gchar *arg = (gchar *) walk->data;
         prop = g_strsplit(arg, "=", 2);
+		g_debug ("arg = %s", arg);
 
         if (g_strv_length (prop) == 2) {
 			if (strcmp (prop[0], "file") == 0) {
@@ -246,6 +246,8 @@
     gmsHandle *handle = gmsHandle_new(uri);
     UriArgs *args;
 
+    args = _uri_parse_args (uri);
+
     if (!gmyth_stream_client_connect (handle->stream,
                                       gnome_vfs_uri_get_host_name  (uri),
                                       gnome_vfs_uri_get_host_port  (uri))) {