summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@redhat.com>2012-07-23 16:00:50 +0200
committerTomas Bzatek <tbzatek@redhat.com>2012-07-31 11:59:37 +0200
commit02f30b8058e61bd3dc6ab70fab1f3b13bd748043 (patch)
tree8a846d758257da0f43660ed69dbe67f8d3a7dd65 /common
parentd5b392afc30cef82ec325a7e3af86a3ee181607e (diff)
downloadgvfs-02f30b8058e61bd3dc6ab70fab1f3b13bd748043.tar.gz
gdbus: Properly suffix functions doing sync proxy creation
...so that they are recognizable on a first sight.
Diffstat (limited to 'common')
-rw-r--r--common/gmountsource.c17
-rw-r--r--common/gmounttracker.c4
2 files changed, 11 insertions, 10 deletions
diff --git a/common/gmountsource.c b/common/gmountsource.c
index 915f646d..5375adbb 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -163,9 +163,9 @@ ask_password_data_free (gpointer _data)
}
static GVfsDBusMountOperation *
-create_mount_operation_proxy (GMountSource *source,
- GAsyncReadyCallback callback,
- gpointer user_data)
+create_mount_operation_proxy_sync (GMountSource *source,
+ GAsyncReadyCallback callback,
+ gpointer user_data)
{
GVfsDBusMountOperation *proxy;
GError *error;
@@ -183,6 +183,7 @@ create_mount_operation_proxy (GMountSource *source,
}
error = NULL;
+ /* Synchronously creating a proxy using unique/private d-bus name and not loading properties or connecting signals should not block */
proxy = gvfs_dbus_mount_operation_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
G_DBUS_PROXY_FLAGS_DO_NOT_CONNECT_SIGNALS | G_DBUS_PROXY_FLAGS_DO_NOT_LOAD_PROPERTIES,
source->dbus_id,
@@ -275,7 +276,7 @@ g_mount_source_ask_password_async (GMountSource *source,
GSimpleAsyncResult *result;
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -617,7 +618,7 @@ g_mount_source_ask_question_async (GMountSource *source,
GSimpleAsyncResult *result;
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -780,7 +781,7 @@ g_mount_source_show_processes_async (GMountSource *source,
GVariantBuilder builder;
guint i;
- proxy = create_mount_operation_proxy (source, callback, user_data);
+ proxy = create_mount_operation_proxy_sync (source, callback, user_data);
if (proxy == NULL)
return;
@@ -960,7 +961,7 @@ g_mount_source_show_unmount_progress (GMountSource *source,
return;
}
- proxy = create_mount_operation_proxy (source, NULL, NULL);
+ proxy = create_mount_operation_proxy_sync (source, NULL, NULL);
if (proxy == NULL)
return;
@@ -1006,7 +1007,7 @@ g_mount_source_abort (GMountSource *source)
{
GVfsDBusMountOperation *proxy;
- proxy = create_mount_operation_proxy (source, NULL, NULL);
+ proxy = create_mount_operation_proxy_sync (source, NULL, NULL);
if (proxy == NULL)
return FALSE;
diff --git a/common/gmounttracker.c b/common/gmounttracker.c
index 2a435b82..d18aa4e1 100644
--- a/common/gmounttracker.c
+++ b/common/gmounttracker.c
@@ -460,7 +460,7 @@ unmounted_cb (GVfsDBusMountTracker *object,
/* Called after construction when the construct properties (like connection) are set */
static void
-init_connection (GMountTracker *tracker)
+init_connection_sync (GMountTracker *tracker)
{
GError *error;
GVariant *iter_mounts;
@@ -517,7 +517,7 @@ g_mount_tracker_constructor (GType type,
tracker = G_MOUNT_TRACKER (object);
- init_connection (tracker);
+ init_connection_sync (tracker);
return object;
}