diff options
author | Alexander Larsson <alexl@redhat.com> | 2008-01-14 10:28:36 +0000 |
---|---|---|
committer | Alexander Larsson <alexl@src.gnome.org> | 2008-01-14 10:28:36 +0000 |
commit | be9164ecbd5cc1bad10f8ece8b8fbaacd9f312a3 (patch) | |
tree | 7aee9a378305fac2adb6d58a9a1c5658002fc91c | |
parent | 9a500881153fe106d3a5e8555e5d2c3fe785a257 (diff) | |
download | gvfs-be9164ecbd5cc1bad10f8ece8b8fbaacd9f312a3.tar.gz |
Fix some crashes
2008-01-14 Alexander Larsson <alexl@redhat.com>
* client/httpuri.c:
(http_to_uri_scheme):
Fix some crashes
svn path=/trunk/; revision=1119
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | client/httpuri.c | 16 |
2 files changed, 15 insertions, 7 deletions
@@ -1,3 +1,9 @@ +2008-01-14 Alexander Larsson <alexl@redhat.com> + + * client/httpuri.c: + (http_to_uri_scheme): + Fix some crashes + 2008-01-13 Dan Winship <danw@gnome.org> * client/httpuri.c (http_from_uri): fix diff --git a/client/httpuri.c b/client/httpuri.c index 40d6fcc7..9c4cff75 100644 --- a/client/httpuri.c +++ b/client/httpuri.c @@ -192,7 +192,7 @@ http_to_uri_scheme (GVfsUriMapper *mapper, gboolean is_ssl; ssl = g_vfs_uri_mount_info_get (info, "ssl"); - type = g_vfs_uri_mount_info_get (info, "ssl"); + type = g_vfs_uri_mount_info_get (info, "type"); if (strcmp (type, "dav") == 0) is_dav = TRUE; @@ -201,16 +201,18 @@ http_to_uri_scheme (GVfsUriMapper *mapper, else return NULL; - is_ssl = strcmp (ssl, "true") == 0; - + is_ssl = + ssl != NULL && + strcmp (ssl, "true") == 0; + if (is_dav && is_ssl) - return "davs"; + return "davs"; else if (is_dav && !is_ssl) - return "dav"; + return "dav"; else if (!is_dav && is_ssl) - return "https"; + return "https"; else - return "http"; + return "http"; } static void |