summaryrefslogtreecommitdiff
path: root/client/gvfsdaemondbus.c
diff options
context:
space:
mode:
authorDavid Zeuthen <davidz@redhat.com>2009-06-17 09:49:44 -0400
committerDavid Zeuthen <davidz@redhat.com>2009-06-17 09:50:35 -0400
commit4053577a19585c63e23e6c6e85011e2df9910745 (patch)
tree8c77e6ab423827a8623e7b55ad77ef362eb669af /client/gvfsdaemondbus.c
parent8a72222d454bdf12e88402b2f012667e7c8e9754 (diff)
downloadgvfs-4053577a19585c63e23e6c6e85011e2df9910745.tar.gz
Bug 585591 – Starting/stopping drives
This is the GVfs implementation for the new GIO API for starting/stopping drives. See http://bugzilla.gnome.org/show_bug.cgi?id=585591 for details.
Diffstat (limited to 'client/gvfsdaemondbus.c')
-rw-r--r--client/gvfsdaemondbus.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/client/gvfsdaemondbus.c b/client/gvfsdaemondbus.c
index c3df2cf6..a9dae139 100644
--- a/client/gvfsdaemondbus.c
+++ b/client/gvfsdaemondbus.c
@@ -508,10 +508,19 @@ async_call_send (AsyncDBusCall *async_call)
{
AsyncCallCancelData *cancel_data;
+ _g_dbus_connection_call_async (async_call->connection,
+ async_call->message,
+ G_VFS_DBUS_TIMEOUT_MSECS,
+ async_dbus_response,
+ async_call);
+
if (async_call->cancellable)
{
cancel_data = g_new0 (AsyncCallCancelData, 1);
cancel_data->connection = dbus_connection_ref (async_call->connection);
+ /* make sure we get the serial *after* the message has been sent, otherwise
+ * it will be 0
+ */
cancel_data->serial = dbus_message_get_serial (async_call->message);
async_call->cancelled_tag =
g_signal_connect_data (async_call->cancellable, "cancelled",
@@ -520,12 +529,6 @@ async_call_send (AsyncDBusCall *async_call)
(GClosureNotify)async_call_cancel_data_free,
0);
}
-
- _g_dbus_connection_call_async (async_call->connection,
- async_call->message,
- G_VFS_DBUS_TIMEOUT_MSECS,
- async_dbus_response,
- async_call);
}
static void