gvfs r1485 - in trunk: . daemon
- From: otte svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1485 - in trunk: . daemon
- Date: Sun, 2 Mar 2008 19:12:05 +0000 (GMT)
Author: otte
Date: Sun Mar 2 19:12:05 2008
New Revision: 1485
URL: http://svn.gnome.org/viewvc/gvfs?rev=1485&view=rev
Log:
2008-03-02 Benjamin Otte <otte gnome org>
* daemon/gvfsbackendftp.c: (do_open_for_read), (do_start_write),
(do_make_directory):
push back connection if we fail starting a read/write
Modified:
trunk/ChangeLog
trunk/daemon/gvfsbackendftp.c
Modified: trunk/daemon/gvfsbackendftp.c
==============================================================================
--- trunk/daemon/gvfsbackendftp.c (original)
+++ trunk/daemon/gvfsbackendftp.c Sun Mar 2 19:12:05 2008
@@ -1056,10 +1056,15 @@
"RETR %s", file);
g_free (file);
- /* don't push the connection back, it's our handle now */
- g_vfs_job_open_for_read_set_handle (job, conn);
- g_vfs_job_open_for_read_set_can_seek (job, FALSE);
- ftp_connection_pop_job (conn);
+ if (ftp_connection_in_error (conn))
+ g_vfs_backend_ftp_push_connection (ftp, conn);
+ else
+ {
+ /* don't push the connection back, it's our handle now */
+ g_vfs_job_open_for_read_set_handle (job, conn);
+ g_vfs_job_open_for_read_set_can_seek (job, FALSE);
+ ftp_connection_pop_job (conn);
+ }
}
static void
@@ -1128,10 +1133,15 @@
varargs);
va_end (varargs);
- /* don't push the connection back, it's our handle now */
- g_vfs_job_open_for_write_set_handle (G_VFS_JOB_OPEN_FOR_WRITE (conn->job), conn);
- g_vfs_job_open_for_write_set_can_seek (G_VFS_JOB_OPEN_FOR_WRITE (conn->job), FALSE);
- ftp_connection_pop_job (conn);
+ if (ftp_connection_in_error (conn))
+ g_vfs_backend_ftp_push_connection (ftp, conn);
+ else
+ {
+ /* don't push the connection back, it's our handle now */
+ g_vfs_job_open_for_write_set_handle (G_VFS_JOB_OPEN_FOR_WRITE (conn->job), conn);
+ g_vfs_job_open_for_write_set_can_seek (G_VFS_JOB_OPEN_FOR_WRITE (conn->job), FALSE);
+ ftp_connection_pop_job (conn);
+ }
}
static void
@@ -1879,6 +1889,8 @@
ftp_connection_send (conn,
0,
"MKD %s", file);
+ /* FIXME: Compare created file with name from server result to be sure
+ * it's correct and otherwise fail. */
g_free (file);
g_vfs_backend_ftp_push_connection (ftp, conn);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]