Re: Offset problem in the ftp module



Hi,

I don't know the ftp method very well either, but I tend to agree with
Alex, ie I'd fix that with the attached patch. See also
http://bugzilla.gnome.org/show_bug.cgi?id=140583

Cheers,

Christophe

Le mer, 12/05/2004 à 16:07 +0200, Alexander Larsson a écrit :
> On Tue, 2004-05-04 at 20:49, Marcus Bjurman wrote:
> 
> > I'm not sure if my patch solves the real problem or just deals with the
> > symptoms of something else. If it is a real solution I'm willing to
> > create a new patch that moves the detection of the 226 code and the
> > reset of the offset variable to a more suitable place then in the
> > ftp_response_to_vfs_result function. That will require a little more
> > work though due to the current handling of response codes in the
> > ftp-module.
> 
> I don't know ftp very well, but i took a look at this. Shouldn't we just
> make sure to set offset to zero in ftp_connection_acquire()? Or will
> that break something?
> 
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  Alexander Larsson                                            Red Hat, Inc 
>                    alexl redhat com    alla lysator liu se 
> He's an ungodly arachnophobic cowboy trapped in a world he never made. She's a 
> manipulative insomniac bodyguard from Mars. They fight crime! 
> 
> _______________________________________________
> gnome-vfs-list mailing list
> gnome-vfs-list gnome org
> http://mail.gnome.org/mailman/listinfo/gnome-vfs-list
> 
> 
? doc.diff
? enum.diff
? ftp.diff
? daemon/gnome-vfs-daemon
? libgnomevfs/s-enum-types-c
? libgnomevfs/s-enum-types-h
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gnome-vfs/ChangeLog,v
retrieving revision 1.1801
diff -u -r1.1801 ChangeLog
--- ChangeLog	15 May 2004 17:40:08 -0000	1.1801
+++ ChangeLog	16 May 2004 10:50:46 -0000
@@ -1,3 +1,8 @@
+2004-05-15  Christophe Fergeau  <teuf gnome org>
+
+	* modules/ftp-method.c: reset connection offset in
+	  ftp_connection_acquire (should fix #140583)
+
 2004-05-15  Damien Carbery  <damien carbery sun com>
 
 	* modules/sftp-method.c: remove TEMP_FAILURE_RETRY macro since it's 
Index: modules/ftp-method.c
===================================================================
RCS file: /cvs/gnome/gnome-vfs/modules/ftp-method.c,v
retrieving revision 1.99
diff -u -r1.99 ftp-method.c
--- modules/ftp-method.c	1 Apr 2004 15:10:51 -0000	1.99
+++ modules/ftp-method.c	16 May 2004 10:50:46 -0000
@@ -757,6 +757,10 @@
 						      conn);
 		g_hash_table_insert (spare_connections, uri, 
 				     possible_connections);
+
+		/* Reset offset */
+		conn->offset = 0;
+
 		/* make sure connection hasn't timed out */
 		result = do_basic_command(conn, "PWD", cancellation);
 		if (result != GNOME_VFS_OK) {

Attachment: signature.asc
Description: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?=



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