gvfs r1119 - in trunk: . client



Author: alexl
Date: Mon Jan 14 10:28:36 2008
New Revision: 1119
URL: http://svn.gnome.org/viewvc/gvfs?rev=1119&view=rev

Log:
2008-01-14  Alexander Larsson  <alexl redhat com>

        * client/httpuri.c:
        (http_to_uri_scheme):
	Fix some crashes
	



Modified:
   trunk/ChangeLog
   trunk/client/httpuri.c

Modified: trunk/client/httpuri.c
==============================================================================
--- trunk/client/httpuri.c	(original)
+++ trunk/client/httpuri.c	Mon Jan 14 10:28:36 2008
@@ -192,7 +192,7 @@
   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 @@
   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



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