gvfs r2358 - in trunk: . client



Author: hansp
Date: Thu Apr  2 04:39:42 2009
New Revision: 2358
URL: http://svn.gnome.org/viewvc/gvfs?rev=2358&view=rev

Log:
2009-04-01  Hans Petter Jansson  <hpj novell com>

        Related to bug #574968 - gvfs ftp backend appears to not wait for ftpd
        return code on STOR.

        * client/gvfsfusedaemon.c
        (vfs_fsync): Implement by closing stream.



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

Modified: trunk/client/gvfsfusedaemon.c
==============================================================================
--- trunk/client/gvfsfusedaemon.c	(original)
+++ trunk/client/gvfsfusedaemon.c	Thu Apr  2 04:39:42 2009
@@ -1424,6 +1424,25 @@
 }
 
 static gint
+vfs_fsync (const gchar *path, gint sync_data_only, 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;
+}
+
+static gint
 vfs_opendir (const gchar *path, struct fuse_file_info *fi)
 {
   GFile *file;
@@ -2302,6 +2321,7 @@
   .create      = vfs_create,
   .release     = vfs_release,
   .flush       = vfs_flush,
+  .fsync       = vfs_fsync,
 
   .read        = vfs_read,
   .write       = vfs_write,



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