Update to 1.8.1
This commit is contained in:
parent
f7eabf6b56
commit
364b747aa7
1
.gitignore
vendored
1
.gitignore
vendored
@ -6,3 +6,4 @@ gvfs-1.6.3.tar.bz2
|
||||
/gvfs-1.7.2.tar.bz2
|
||||
/gvfs-1.7.3.tar.bz2
|
||||
/gvfs-1.8.0.tar.bz2
|
||||
/gvfs-1.8.1.tar.bz2
|
||||
|
@ -1,452 +0,0 @@
|
||||
From 7460f26f9243e6b1745a448b8dc05b15d12aa86e Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Fri, 15 Apr 2011 11:05:30 +0000
|
||||
Subject: Don't leak dbus messages
|
||||
|
||||
We're missing a lot of dbus_message_unref after sending
|
||||
messages, add them.
|
||||
---
|
||||
diff --git a/daemon/daemon-main.c b/daemon/daemon-main.c
|
||||
index 22cebe6..13e4780 100644
|
||||
--- a/daemon/daemon-main.c
|
||||
+++ b/daemon/daemon-main.c
|
||||
@@ -127,6 +127,7 @@ send_spawned (DBusConnection *connection, gboolean succeeded, char *error_messag
|
||||
_g_dbus_oom ();
|
||||
|
||||
dbus_connection_send (connection, message, NULL);
|
||||
+ dbus_message_unref (message);
|
||||
/* Make sure the message is sent */
|
||||
dbus_connection_flush (connection);
|
||||
}
|
||||
diff --git a/daemon/gvfsjobcopy.c b/daemon/gvfsjobcopy.c
|
||||
index 730e1e2..e833168 100644
|
||||
--- a/daemon/gvfsjobcopy.c
|
||||
+++ b/daemon/gvfsjobcopy.c
|
||||
@@ -104,6 +104,8 @@ g_vfs_job_copy_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
+
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobcreatemonitor.c b/daemon/gvfsjobcreatemonitor.c
|
||||
index 074a866..e825de3 100644
|
||||
--- a/daemon/gvfsjobcreatemonitor.c
|
||||
+++ b/daemon/gvfsjobcreatemonitor.c
|
||||
@@ -104,6 +104,7 @@ g_vfs_job_create_monitor_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobdelete.c b/daemon/gvfsjobdelete.c
|
||||
index 688e604..bbc3891 100644
|
||||
--- a/daemon/gvfsjobdelete.c
|
||||
+++ b/daemon/gvfsjobdelete.c
|
||||
@@ -96,6 +96,7 @@ g_vfs_job_delete_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobenumerate.c b/daemon/gvfsjobenumerate.c
|
||||
index 90ff452..208f0ba 100644
|
||||
--- a/daemon/gvfsjobenumerate.c
|
||||
+++ b/daemon/gvfsjobenumerate.c
|
||||
@@ -110,6 +110,7 @@ g_vfs_job_enumerate_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobmakedirectory.c b/daemon/gvfsjobmakedirectory.c
|
||||
index 2e9c7e2..61257d9 100644
|
||||
--- a/daemon/gvfsjobmakedirectory.c
|
||||
+++ b/daemon/gvfsjobmakedirectory.c
|
||||
@@ -96,6 +96,7 @@ g_vfs_job_make_directory_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobmakesymlink.c b/daemon/gvfsjobmakesymlink.c
|
||||
index 157e70f..0ea22fa 100644
|
||||
--- a/daemon/gvfsjobmakesymlink.c
|
||||
+++ b/daemon/gvfsjobmakesymlink.c
|
||||
@@ -99,6 +99,7 @@ g_vfs_job_make_symlink_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobmountmountable.c b/daemon/gvfsjobmountmountable.c
|
||||
index 1d60836..6cc2ea2 100644
|
||||
--- a/daemon/gvfsjobmountmountable.c
|
||||
+++ b/daemon/gvfsjobmountmountable.c
|
||||
@@ -109,6 +109,7 @@ g_vfs_job_mount_mountable_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobmove.c b/daemon/gvfsjobmove.c
|
||||
index 0f3b7a2..9a6bd89 100644
|
||||
--- a/daemon/gvfsjobmove.c
|
||||
+++ b/daemon/gvfsjobmove.c
|
||||
@@ -104,6 +104,7 @@ g_vfs_job_move_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobopenforread.c b/daemon/gvfsjobopenforread.c
|
||||
index 31265db..d217c27 100644
|
||||
--- a/daemon/gvfsjobopenforread.c
|
||||
+++ b/daemon/gvfsjobopenforread.c
|
||||
@@ -106,6 +106,7 @@ g_vfs_job_open_for_read_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobopenforwrite.c b/daemon/gvfsjobopenforwrite.c
|
||||
index 6d368f8..6e7396c 100644
|
||||
--- a/daemon/gvfsjobopenforwrite.c
|
||||
+++ b/daemon/gvfsjobopenforwrite.c
|
||||
@@ -116,6 +116,7 @@ g_vfs_job_open_for_write_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
g_free (path);
|
||||
return NULL;
|
||||
}
|
||||
diff --git a/daemon/gvfsjobopeniconforread.c b/daemon/gvfsjobopeniconforread.c
|
||||
index 1e36a24..59e813a 100644
|
||||
--- a/daemon/gvfsjobopeniconforread.c
|
||||
+++ b/daemon/gvfsjobopeniconforread.c
|
||||
@@ -87,6 +87,7 @@ g_vfs_job_open_icon_for_read_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobpollmountable.c b/daemon/gvfsjobpollmountable.c
|
||||
index 4fa67b1..ac59da2 100644
|
||||
--- a/daemon/gvfsjobpollmountable.c
|
||||
+++ b/daemon/gvfsjobpollmountable.c
|
||||
@@ -99,6 +99,7 @@ g_vfs_job_poll_mountable_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobpull.c b/daemon/gvfsjobpull.c
|
||||
index 4d66bf0..1d4bc78 100644
|
||||
--- a/daemon/gvfsjobpull.c
|
||||
+++ b/daemon/gvfsjobpull.c
|
||||
@@ -107,6 +107,7 @@ g_vfs_job_pull_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobpush.c b/daemon/gvfsjobpush.c
|
||||
index 49680b3..b4b3874 100644
|
||||
--- a/daemon/gvfsjobpush.c
|
||||
+++ b/daemon/gvfsjobpush.c
|
||||
@@ -107,6 +107,7 @@ g_vfs_job_push_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobqueryattributes.c b/daemon/gvfsjobqueryattributes.c
|
||||
index 426a26b..3307cfa 100644
|
||||
--- a/daemon/gvfsjobqueryattributes.c
|
||||
+++ b/daemon/gvfsjobqueryattributes.c
|
||||
@@ -100,6 +100,7 @@ g_vfs_job_query_attributes_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobqueryfsinfo.c b/daemon/gvfsjobqueryfsinfo.c
|
||||
index cce7ded..e464590 100644
|
||||
--- a/daemon/gvfsjobqueryfsinfo.c
|
||||
+++ b/daemon/gvfsjobqueryfsinfo.c
|
||||
@@ -101,6 +101,7 @@ g_vfs_job_query_fs_info_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobqueryinfo.c b/daemon/gvfsjobqueryinfo.c
|
||||
index 3a52539..27c8edc 100644
|
||||
--- a/daemon/gvfsjobqueryinfo.c
|
||||
+++ b/daemon/gvfsjobqueryinfo.c
|
||||
@@ -110,6 +110,7 @@ g_vfs_job_query_info_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobsetattribute.c b/daemon/gvfsjobsetattribute.c
|
||||
index c908216..ad2a8a2 100644
|
||||
--- a/daemon/gvfsjobsetattribute.c
|
||||
+++ b/daemon/gvfsjobsetattribute.c
|
||||
@@ -120,6 +120,7 @@ g_vfs_job_set_attribute_new (DBusConnection *connection,
|
||||
_("Invalid dbus message"));
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobsetdisplayname.c b/daemon/gvfsjobsetdisplayname.c
|
||||
index 9ac10a3..0816c8b 100644
|
||||
--- a/daemon/gvfsjobsetdisplayname.c
|
||||
+++ b/daemon/gvfsjobsetdisplayname.c
|
||||
@@ -100,6 +100,7 @@ g_vfs_job_set_display_name_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobstartmountable.c b/daemon/gvfsjobstartmountable.c
|
||||
index e862846..b4492db 100644
|
||||
--- a/daemon/gvfsjobstartmountable.c
|
||||
+++ b/daemon/gvfsjobstartmountable.c
|
||||
@@ -105,6 +105,7 @@ g_vfs_job_start_mountable_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobstopmountable.c b/daemon/gvfsjobstopmountable.c
|
||||
index 31f480a..c291d38 100644
|
||||
--- a/daemon/gvfsjobstopmountable.c
|
||||
+++ b/daemon/gvfsjobstopmountable.c
|
||||
@@ -107,6 +107,7 @@ g_vfs_job_stop_mountable_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobtrash.c b/daemon/gvfsjobtrash.c
|
||||
index e6f6388..338bf0d 100644
|
||||
--- a/daemon/gvfsjobtrash.c
|
||||
+++ b/daemon/gvfsjobtrash.c
|
||||
@@ -96,6 +96,7 @@ g_vfs_job_trash_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobunmount.c b/daemon/gvfsjobunmount.c
|
||||
index ee2cb7e..17e364f 100644
|
||||
--- a/daemon/gvfsjobunmount.c
|
||||
+++ b/daemon/gvfsjobunmount.c
|
||||
@@ -106,6 +106,7 @@ g_vfs_job_unmount_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsjobunmountmountable.c b/daemon/gvfsjobunmountmountable.c
|
||||
index ed648ca..9cf9c2d 100644
|
||||
--- a/daemon/gvfsjobunmountmountable.c
|
||||
+++ b/daemon/gvfsjobunmountmountable.c
|
||||
@@ -108,6 +108,7 @@ g_vfs_job_unmount_mountable_new (DBusConnection *connection,
|
||||
dbus_error_free (&derror);
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
diff --git a/daemon/gvfsmonitor.c b/daemon/gvfsmonitor.c
|
||||
index 4b91ece..8947099 100644
|
||||
--- a/daemon/gvfsmonitor.c
|
||||
+++ b/daemon/gvfsmonitor.c
|
||||
@@ -184,8 +184,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
|
||||
derror.name,
|
||||
derror.message);
|
||||
dbus_error_free (&derror);
|
||||
-
|
||||
+
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -199,8 +200,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
|
||||
|
||||
reply = dbus_message_new_method_return (message);
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
-
|
||||
+
|
||||
return DBUS_HANDLER_RESULT_HANDLED;
|
||||
}
|
||||
else if (dbus_message_is_method_call (message,
|
||||
@@ -216,8 +218,9 @@ vfs_monitor_message_callback (DBusConnection *connection,
|
||||
derror.name,
|
||||
derror.message);
|
||||
dbus_error_free (&derror);
|
||||
-
|
||||
+
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -235,9 +238,10 @@ vfs_monitor_message_callback (DBusConnection *connection,
|
||||
break;
|
||||
}
|
||||
}
|
||||
-
|
||||
+
|
||||
reply = dbus_message_new_method_return (message);
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
|
||||
g_object_unref (monitor);
|
||||
}
|
||||
diff --git a/daemon/mount.c b/daemon/mount.c
|
||||
index 2331559..6eb07d3 100644
|
||||
--- a/daemon/mount.c
|
||||
+++ b/daemon/mount.c
|
||||
@@ -757,6 +757,7 @@ register_mount (DBusConnection *connection,
|
||||
_g_dbus_oom ();
|
||||
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
@@ -778,6 +779,7 @@ automount_done (VfsMountable *mountable,
|
||||
G_IO_ERROR, G_IO_ERROR_NOT_MOUNTED,
|
||||
_("Automount failed: %s"), error->message);
|
||||
dbus_connection_send (data->connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
else
|
||||
lookup_mount (data->connection,
|
||||
@@ -870,7 +872,10 @@ lookup_mount (DBusConnection *connection,
|
||||
|
||||
g_mount_spec_unref (spec);
|
||||
if (reply != NULL)
|
||||
- dbus_connection_send (connection, reply, NULL);
|
||||
+ {
|
||||
+ dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -910,9 +915,12 @@ lookup_mount_by_fuse_path (DBusConnection *connection,
|
||||
reply = dbus_message_new_error (message,
|
||||
DBUS_ERROR_INVALID_ARGS,
|
||||
"Invalid arguments");
|
||||
-
|
||||
+
|
||||
if (reply != NULL)
|
||||
- dbus_connection_send (connection, reply, NULL);
|
||||
+ {
|
||||
+ dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -958,8 +966,9 @@ list_mounts (DBusConnection *connection,
|
||||
|
||||
if (!dbus_message_iter_close_container (&iter, &array_iter))
|
||||
_g_dbus_oom ();
|
||||
-
|
||||
+
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1047,7 +1056,10 @@ mount_location (DBusConnection *connection,
|
||||
}
|
||||
|
||||
if (reply)
|
||||
- dbus_connection_send (connection, reply, NULL);
|
||||
+ {
|
||||
+ dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
+ }
|
||||
else
|
||||
{
|
||||
GMountSource *source;
|
||||
@@ -1099,8 +1111,9 @@ list_mount_types (DBusConnection *connection,
|
||||
|
||||
if (!dbus_message_iter_close_container (&iter, &array_iter))
|
||||
_g_dbus_oom ();
|
||||
-
|
||||
+
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1140,8 +1153,9 @@ list_mountable_info (DBusConnection *connection,
|
||||
|
||||
if (!dbus_message_iter_close_container (&iter, &array_iter))
|
||||
_g_dbus_oom ();
|
||||
-
|
||||
+
|
||||
dbus_connection_send (connection, reply, NULL);
|
||||
+ dbus_message_unref (reply);
|
||||
}
|
||||
|
||||
static DBusHandlerResult
|
||||
--
|
||||
cgit v0.9
|
@ -1,23 +0,0 @@
|
||||
From 9bfe6ccdf1143c9f5409d17908f40c7544ceb119 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Fri, 15 Apr 2011 12:49:25 +0000
|
||||
Subject: gdu volume monitor: Fix check for symlinks in /dev, was reversed
|
||||
|
||||
Spotted by Emilio Pozuelo Monfort in
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=601497
|
||||
---
|
||||
diff --git a/monitor/gdu/ggduvolumemonitor.c b/monitor/gdu/ggduvolumemonitor.c
|
||||
index 794d354..1066f4f 100644
|
||||
--- a/monitor/gdu/ggduvolumemonitor.c
|
||||
+++ b/monitor/gdu/ggduvolumemonitor.c
|
||||
@@ -1427,7 +1427,7 @@ update_fstab_volumes (GGduVolumeMonitor *monitor,
|
||||
GduDevice *device;
|
||||
|
||||
/* doesn't exist */
|
||||
- if (realpath (device_file, resolved_path) != NULL)
|
||||
+ if (realpath (device_file, resolved_path) == NULL)
|
||||
continue;
|
||||
|
||||
/* is handled by DKD */
|
||||
--
|
||||
cgit v0.9
|
@ -1,183 +0,0 @@
|
||||
From 0babec2c24287a8578be488dacb0428998aa5648 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Larsson <alexl@redhat.com>
|
||||
Date: Fri, 15 Apr 2011 10:14:46 +0000
|
||||
Subject: Fix threadsafety of closing channels
|
||||
|
||||
There is a race in g_vfs_job_close_read_finalize vs command_read_cb
|
||||
where if these run in different threads (the command_read_cb in the main
|
||||
thread and the close in another thread), such as in the smb case then
|
||||
we may free the channel early.
|
||||
|
||||
We fix this by having the command reading propely ref the channel and
|
||||
add a cancellable that allows us to cancel the command reading when the
|
||||
channel is closed.
|
||||
---
|
||||
diff --git a/daemon/gvfschannel.c b/daemon/gvfschannel.c
|
||||
index efe2376..f746f55 100644
|
||||
--- a/daemon/gvfschannel.c
|
||||
+++ b/daemon/gvfschannel.c
|
||||
@@ -61,6 +61,7 @@ typedef struct
|
||||
{
|
||||
GVfsChannel *channel;
|
||||
GInputStream *command_stream;
|
||||
+ GCancellable *cancellable;
|
||||
char buffer[G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE];
|
||||
int buffer_size;
|
||||
char *data;
|
||||
@@ -84,6 +85,7 @@ struct _GVfsChannelPrivate
|
||||
GVfsBackend *backend;
|
||||
gboolean connection_closed;
|
||||
GInputStream *command_stream;
|
||||
+ GCancellable *cancellable;
|
||||
GOutputStream *reply_stream;
|
||||
int remote_fd;
|
||||
GPid actual_consumer;
|
||||
@@ -94,8 +96,6 @@ struct _GVfsChannelPrivate
|
||||
|
||||
GList *queued_requests;
|
||||
|
||||
- RequestReader *request_reader;
|
||||
-
|
||||
char reply_buffer[G_VFS_DAEMON_SOCKET_PROTOCOL_REPLY_SIZE];
|
||||
int reply_buffer_pos;
|
||||
|
||||
@@ -130,13 +130,13 @@ g_vfs_channel_finalize (GObject *object)
|
||||
g_object_unref (channel->priv->reply_stream);
|
||||
channel->priv->reply_stream = NULL;
|
||||
|
||||
- if (channel->priv->request_reader)
|
||||
- channel->priv->request_reader->channel = NULL;
|
||||
- channel->priv->request_reader = NULL;
|
||||
-
|
||||
if (channel->priv->command_stream)
|
||||
g_object_unref (channel->priv->command_stream);
|
||||
channel->priv->command_stream = NULL;
|
||||
+
|
||||
+ if (channel->priv->cancellable)
|
||||
+ g_object_unref (channel->priv->cancellable);
|
||||
+ channel->priv->cancellable = NULL;
|
||||
|
||||
if (channel->priv->remote_fd != -1)
|
||||
close (channel->priv->remote_fd);
|
||||
@@ -204,6 +204,7 @@ g_vfs_channel_init (GVfsChannel *channel)
|
||||
else
|
||||
{
|
||||
channel->priv->command_stream = g_unix_input_stream_new (socket_fds[0], TRUE);
|
||||
+ channel->priv->cancellable = g_cancellable_new ();
|
||||
channel->priv->reply_stream = g_unix_output_stream_new (socket_fds[0], FALSE);
|
||||
channel->priv->remote_fd = socket_fds[1];
|
||||
|
||||
@@ -284,6 +285,8 @@ static void
|
||||
request_reader_free (RequestReader *reader)
|
||||
{
|
||||
g_object_unref (reader->command_stream);
|
||||
+ g_object_unref (reader->cancellable);
|
||||
+ g_object_unref (reader->channel);
|
||||
g_free (reader->data);
|
||||
g_free (reader);
|
||||
}
|
||||
@@ -426,7 +429,7 @@ finish_request (RequestReader *reader)
|
||||
g_input_stream_read_async (reader->command_stream,
|
||||
reader->buffer + reader->buffer_size,
|
||||
G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
|
||||
- 0, NULL,
|
||||
+ 0, reader->cancellable,
|
||||
command_read_cb,
|
||||
reader);
|
||||
}
|
||||
@@ -440,18 +443,10 @@ data_read_cb (GObject *source_object,
|
||||
GInputStream *stream = G_INPUT_STREAM (source_object);
|
||||
gssize count_read;
|
||||
|
||||
- if (reader->channel == NULL)
|
||||
- {
|
||||
- /* Channel was finalized */
|
||||
- request_reader_free (reader);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
count_read = g_input_stream_read_finish (stream, res, NULL);
|
||||
|
||||
if (count_read <= 0)
|
||||
{
|
||||
- reader->channel->priv->request_reader = NULL;
|
||||
g_vfs_channel_connection_closed (reader->channel);
|
||||
request_reader_free (reader);
|
||||
return;
|
||||
@@ -464,7 +459,7 @@ data_read_cb (GObject *source_object,
|
||||
g_input_stream_read_async (reader->command_stream,
|
||||
reader->data + reader->data_pos,
|
||||
reader->data_len - reader->data_pos,
|
||||
- 0, NULL,
|
||||
+ 0, reader->cancellable,
|
||||
data_read_cb, reader);
|
||||
return;
|
||||
}
|
||||
@@ -484,18 +479,10 @@ command_read_cb (GObject *source_object,
|
||||
guint32 data_len;
|
||||
gssize count_read;
|
||||
|
||||
- if (reader->channel == NULL)
|
||||
- {
|
||||
- /* Channel was finalized */
|
||||
- request_reader_free (reader);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
count_read = g_input_stream_read_finish (stream, res, NULL);
|
||||
|
||||
if (count_read <= 0)
|
||||
{
|
||||
- reader->channel->priv->request_reader = NULL;
|
||||
g_vfs_channel_connection_closed (reader->channel);
|
||||
request_reader_free (reader);
|
||||
return;
|
||||
@@ -508,7 +495,7 @@ command_read_cb (GObject *source_object,
|
||||
g_input_stream_read_async (reader->command_stream,
|
||||
reader->buffer + reader->buffer_size,
|
||||
G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
|
||||
- 0, NULL,
|
||||
+ 0, reader->cancellable,
|
||||
command_read_cb, reader);
|
||||
return;
|
||||
}
|
||||
@@ -525,7 +512,7 @@ command_read_cb (GObject *source_object,
|
||||
g_input_stream_read_async (reader->command_stream,
|
||||
reader->data + reader->data_pos,
|
||||
reader->data_len - reader->data_pos,
|
||||
- 0, NULL,
|
||||
+ 0, reader->cancellable,
|
||||
data_read_cb, reader);
|
||||
return;
|
||||
}
|
||||
@@ -539,16 +526,15 @@ start_request_reader (GVfsChannel *channel)
|
||||
RequestReader *reader;
|
||||
|
||||
reader = g_new0 (RequestReader, 1);
|
||||
- reader->channel = channel;
|
||||
+ reader->channel = g_object_ref (channel);
|
||||
+ reader->cancellable = g_object_ref (channel->priv->cancellable);
|
||||
reader->command_stream = g_object_ref (channel->priv->command_stream);
|
||||
|
||||
g_input_stream_read_async (reader->command_stream,
|
||||
reader->buffer + reader->buffer_size,
|
||||
G_VFS_DAEMON_SOCKET_PROTOCOL_REQUEST_SIZE - reader->buffer_size,
|
||||
- 0, NULL,
|
||||
+ 0, reader->cancellable,
|
||||
command_read_cb, reader);
|
||||
-
|
||||
- channel->priv->request_reader = reader;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -615,6 +601,8 @@ send_reply_cb (GObject *source_object,
|
||||
if (G_VFS_IS_JOB_CLOSE_READ (job) ||
|
||||
G_VFS_IS_JOB_CLOSE_WRITE (job))
|
||||
{
|
||||
+ /* Cancel the reader */
|
||||
+ g_cancellable_cancel (channel->priv->cancellable);
|
||||
g_vfs_job_source_closed (G_VFS_JOB_SOURCE (channel));
|
||||
channel->priv->backend_handle = NULL;
|
||||
}
|
||||
--
|
||||
cgit v0.9
|
15
gvfs.spec
15
gvfs.spec
@ -1,7 +1,7 @@
|
||||
Summary: Backends for the gio framework in GLib
|
||||
Name: gvfs
|
||||
Version: 1.8.0
|
||||
Release: 3%{?dist}
|
||||
Version: 1.8.1
|
||||
Release: 1%{?dist}
|
||||
License: LGPLv2+
|
||||
Group: System Environment/Libraries
|
||||
URL: http://www.gtk.org
|
||||
@ -39,11 +39,6 @@ Patch0: gvfs-archive-integration.patch
|
||||
# https://bugzilla.redhat.com/show_bug.cgi?id=552856
|
||||
Patch15: gvfs-1.5.1-gphoto2-no-storageinfo-support.patch
|
||||
|
||||
# from upstream
|
||||
Patch16: gvfs-1.8.1-gvfschannel-safety.patch
|
||||
Patch17: gvfs-1.8.1-dbus-leak.patch
|
||||
Patch18: gvfs-1.8.1-gdu-volume-monitor-realpath.patch
|
||||
|
||||
Obsoletes: gnome-mount <= 0.8
|
||||
Obsoletes: gnome-mount-nautilus-properties <= 0.8
|
||||
|
||||
@ -141,9 +136,6 @@ including phones and music players to applications using gvfs.
|
||||
%setup -q
|
||||
%patch0 -p1 -b .archive-integration
|
||||
%patch15 -p1 -b .gphoto2-storageinfo
|
||||
%patch16 -p1 -b .channel-safety
|
||||
%patch17 -p1 -b .dbus-leak
|
||||
%patch18 -p1 -b .realpath
|
||||
|
||||
%build
|
||||
|
||||
@ -318,6 +310,9 @@ killall -USR1 gvfsd >&/dev/null || :
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue Apr 26 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.8.1-1
|
||||
- Update to 1.8.1
|
||||
|
||||
* Fri Apr 22 2011 Tomas Bzatek <tbzatek@redhat.com> - 1.8.0-3
|
||||
- Build without HAL -> expect obexftp breakage.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user