gvfs r1822 - in trunk: . client
- From: hansp svn gnome org
- To: svn-commits-list gnome org
- Subject: gvfs r1822 - in trunk: . client
- Date: Fri, 18 Jul 2008 23:18:52 +0000 (UTC)
Author: hansp
Date: Fri Jul 18 23:18:52 2008
New Revision: 1822
URL: http://svn.gnome.org/viewvc/gvfs?rev=1822&view=rev
Log:
2008-07-18 Hans Petter Jansson <hpj novell com>
* client/gvfsfusedaemon.c (vfs_open)
(vfs_create): Hold the file handle lock while opening the stream.
Second part of fix for #536614.
Modified:
trunk/ChangeLog
trunk/client/gvfsfusedaemon.c
Modified: trunk/client/gvfsfusedaemon.c
==============================================================================
--- trunk/client/gvfsfusedaemon.c (original)
+++ trunk/client/gvfsfusedaemon.c Fri Jul 18 23:18:52 2008
@@ -959,11 +959,15 @@
/* Set up a stream here, so we can check for errors */
+ g_mutex_lock (fh->mutex);
+
if (fi->flags & O_WRONLY || fi->flags & O_RDWR)
result = setup_output_stream (file, fh);
else
result = setup_input_stream (file, fh);
+ g_mutex_unlock (fh->mutex);
+
/* The added reference to the file handle is released in vfs_release() */
}
else if (file_type == G_FILE_TYPE_DIRECTORY)
@@ -1047,11 +1051,14 @@
SET_FILE_HANDLE (fi, fh);
- g_assert (fh->stream == NULL);
+ g_mutex_lock (fh->mutex);
+ file_handle_close_stream (fh);
fh->stream = file_output_stream;
fh->op = FILE_OP_WRITE;
+ g_mutex_unlock (fh->mutex);
+
/* The added reference to the file handle is released in vfs_release() */
}
else
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]