SOURCES: gnome-vfs2-ftp_ls_parse_fix.patch (NEW), gnome-vfs2-smb_c...

freetz freetz at pld-linux.org
Tue May 23 22:42:32 CEST 2006


Author: freetz                       Date: Tue May 23 20:42:32 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- bugfixes for smb and ftp methods

---- Files affected:
SOURCES:
   gnome-vfs2-ftp_ls_parse_fix.patch (NONE -> 1.1)  (NEW), gnome-vfs2-smb_cache_lookup_fix.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/gnome-vfs2-ftp_ls_parse_fix.patch
diff -u /dev/null SOURCES/gnome-vfs2-ftp_ls_parse_fix.patch:1.1
--- /dev/null	Tue May 23 22:42:32 2006
+++ SOURCES/gnome-vfs2-ftp_ls_parse_fix.patch	Tue May 23 22:42:27 2006
@@ -0,0 +1,12 @@
+diff -Nur gnome-vfs2-2.14.0/libgnomevfs/gnome-vfs-parse-ls.c gnome-vfs2-2.14.0.new/libgnomevfs/gnome-vfs-parse-ls.c
+--- gnome-vfs2-2.14.0/libgnomevfs/gnome-vfs-parse-ls.c	2005-11-14 12:24:14.000000000 +0100
++++ gnome-vfs2-2.14.0.new/libgnomevfs/gnome-vfs-parse-ls.c	2006-04-18 21:35:02.000000000 +0200
+@@ -624,7 +624,7 @@
+ 		if (!is_num (columns[idx2]))
+ 			goto error;
+ 	
+-		s->st_size = (gsize) atol (columns [idx2]);
++		s->st_size = (gsize) atoll (columns [idx2]);
+ #ifdef HAVE_ST_RDEV
+ 		s->st_rdev = 0;
+ #endif

================================================================
Index: SOURCES/gnome-vfs2-smb_cache_lookup_fix.patch
diff -u /dev/null SOURCES/gnome-vfs2-smb_cache_lookup_fix.patch:1.1
--- /dev/null	Tue May 23 22:42:32 2006
+++ SOURCES/gnome-vfs2-smb_cache_lookup_fix.patch	Tue May 23 22:42:27 2006
@@ -0,0 +1,38 @@
+Index: modules/smb-method.c
+===================================================================
+RCS file: /cvs/gnome/gnome-vfs/modules/smb-method.c,v
+retrieving revision 1.36
+diff -u -p -r1.36 smb-method.c
+--- modules/smb-method.c	28 Feb 2006 12:27:35 -0000	1.36
++++ modules/smb-method.c	30 Mar 2006 12:55:22 -0000
+@@ -190,6 +188,14 @@ string_ndup_nzero (const gchar *s, const
+ 		return NULL;
+ 	return g_strndup (s, n);
+ }
++
++static const char*
++string_nzero  (const gchar *s)
++{
++	if (!s || !s[0])
++		return NULL;
++	return s;
++}
+ 	     	   
+ static gboolean
+ string_compare (const char *a, const char *b)
+@@ -384,10 +390,11 @@ find_cached_server (const char *server_n
+ 
+ 	DEBUG_SMB(("find_cached_server: server: %s, share: %s, domain: %s, user: %s\n", server_name, share_name, domain, username));
+ 
+-	entry.server_name = (char *)server_name;
+-	entry.share_name = (char *)share_name;
+-	entry.domain = (char *)domain;
+-	entry.username = (char *)username;
++	/* "" must be treated as NULL, because add_cached_server() uses string_dup_nzero() */
++	entry.server_name = (char *) string_nzero (server_name);
++	entry.share_name = (char *) string_nzero (share_name);
++	entry.domain = (char *) string_nzero (domain);
++	entry.username = (char *) string_nzero (username);
+ 
+ 	res = g_hash_table_lookup (server_cache, &entry);
+ 
================================================================


More information about the pld-cvs-commit mailing list