summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@gnome.org>2008-03-03 16:32:32 +0000
committerBenjamin Otte <otte@src.gnome.org>2008-03-03 16:32:32 +0000
commit2e7778b6d73b9db4150029a12b3149693102d1c2 (patch)
tree7469d807237d57a7e98b0075310a8f03279369f0
parentd8be4133c186feba686e0f3b9fbcceb4492402f4 (diff)
downloadgvfs-2e7778b6d73b9db4150029a12b3149693102d1c2.tar.gz
revert yesterday's commit. It broke the obex and gphoto backends. We now
2008-03-03 Benjamin Otte <otte@gnome.org> * client/gvfsuriutils.c: (g_vfs_decode_uri): revert yesterday's commit. It broke the obex and gphoto backends. We now parse hostnames different for internet hosts. * daemon/ftp.mount.in: Parse hostnames different. svn path=/trunk/; revision=1511
-rw-r--r--ChangeLog8
-rw-r--r--client/gvfsuriutils.c16
-rw-r--r--daemon/ftp.mount.in3
3 files changed, 18 insertions, 9 deletions
diff --git a/ChangeLog b/ChangeLog
index 1cc9675b..ca970768 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2008-03-03 Benjamin Otte <otte@gnome.org>
+ * client/gvfsuriutils.c: (g_vfs_decode_uri):
+ revert yesterday's commit. It broke the obex and gphoto backends. We
+ now parse hostnames different for internet hosts.
+ * daemon/ftp.mount.in:
+ Parse hostnames different.
+
+2008-03-03 Benjamin Otte <otte@gnome.org>
+
* daemon/gvfsbackendftp.c: (ftp_connection_receive),
(ftp_connection_sendv), (g_vfs_backend_ftp_pop_connection),
(do_mount):
diff --git a/client/gvfsuriutils.c b/client/gvfsuriutils.c
index f281ba89..428f1ef2 100644
--- a/client/gvfsuriutils.c
+++ b/client/gvfsuriutils.c
@@ -181,25 +181,23 @@ g_vfs_decode_uri (const char *uri)
return NULL;
}
port_start = memchr (host_end, ':', authority_end - host_start);
- host_start++;
}
else
{
port_start = memchr (host_start, ':', authority_end - host_start);
- host_end = port_start ? port_start : authority_end;
}
if (port_start)
{
- decoded->port = atoi(port_start + 1);
- if (decoded->port <= 0)
- {
- g_vfs_decoded_uri_free (decoded);
- return NULL;
- }
+ host_end = port_start++;
+
+ decoded->port = atoi(port_start);
}
else
- decoded->port = -1;
+ {
+ host_end = authority_end;
+ decoded->port = -1;
+ }
decoded->host = g_strndup (host_start, host_end - host_start);
diff --git a/daemon/ftp.mount.in b/daemon/ftp.mount.in
index a7521582..e1133392 100644
--- a/daemon/ftp.mount.in
+++ b/daemon/ftp.mount.in
@@ -2,3 +2,6 @@
Type=ftp
Exec=@libexecdir@/gvfsd-ftp
AutoMount=false
+Scheme=ftp
+DefaultPort=21
+HostnameIsInetAddress=true