summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Petter Jansson <hpj@novell.com>2009-04-01 20:26:59 +0000
committerHans Petter <hansp@src.gnome.org>2009-04-01 20:26:59 +0000
commitb8d977f70af46ed6bb5a715728cafa82b22d59b9 (patch)
treea6e41108d23f4b3015ecd83f3f8ec45e914533e7
parent7a981dffd5c9eb56bc10c46548c0e6d0716b0249 (diff)
downloadgvfs-b8d977f70af46ed6bb5a715728cafa82b22d59b9.tar.gz
Potential fix for bug #574968 - gvfs ftp backend appears to not wait for
2009-04-01 Hans Petter Jansson <hpj@novell.com> Potential fix for bug #574968 - gvfs ftp backend appears to not wait for ftpd return code on STOR. * client/gvfsfusedaemon.c (vfs_flush): Implement by closing stream. svn path=/trunk/; revision=2356
-rw-r--r--ChangeLog8
-rw-r--r--client/gvfsfusedaemon.c11
2 files changed, 19 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 6b395cc9..9beef42f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-04-01 Hans Petter Jansson <hpj@novell.com>
+
+ Potential fix for bug #574968 - gvfs ftp backend appears to not wait
+ for ftpd return code on STOR.
+
+ * client/gvfsfusedaemon.c
+ (vfs_flush): Implement by closing stream.
+
2009-03-31 Alexander Larsson <alexl@redhat.com>
* client/gdaemonmount.c:
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 9071776f..2a87d357 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -1406,8 +1406,19 @@ vfs_write (const gchar *path, const gchar *buf, size_t len, off_t offset,
static gint
vfs_flush (const gchar *path, struct fuse_file_info *fi)
{
+ FileHandle *fh = get_file_handle_from_info (fi);
+
debug_print ("vfs_flush: %s\n", path);
+ if (fh)
+ {
+ file_handle_close_stream (fh);
+
+ /* get_file_handle_from_info () adds a "working ref", so release that. */
+ file_handle_unref (fh);
+ }
+
+ /* TODO: Error handling. */
return 0;
}