summaryrefslogtreecommitdiff
path: root/gio/gdbusnameowning.c
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2010-05-24 16:46:24 -0400
committerRyan Lortie <desrt@desrt.ca>2010-05-24 17:00:04 -0400
commit3160bcad6a0cf3c1f1042b85f38492a5674324a3 (patch)
tree27b976733fa4a3b20dcd6a9f17e2a6a10599ea85 /gio/gdbusnameowning.c
parent100df5287d51fd005d64f2c06f4fe4276da1c4d8 (diff)
downloadglib-3160bcad6a0cf3c1f1042b85f38492a5674324a3.tar.gz
GDBusConnection.call(): add 'reply_type' argument
This allows the caller to specify the reply type that they are expecting for this call. If the reply comes back with the wrong type, GDBus will generate an appropriate error internally. - add a GVariantType * argument to g_dbus_connection_call() and _call_sync(). - move the internal API for computing message types from introspection data to be based on GVariantType instead of strings. Update users of this code. - have GDBusProxy pass this calculated GVariantType into g_dbus_connection_call(). Remove the checks done in GDBusProxy. - Update other users of the code (test cases, gdbus-tool, GSettings tool, etc). In some cases, remove redundant checks; in some other cases, we are fixing bugs because no checking was done where it should have been. Closes bug #619391.
Diffstat (limited to 'gio/gdbusnameowning.c')
-rw-r--r--gio/gdbusnameowning.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gio/gdbusnameowning.c b/gio/gdbusnameowning.c
index e14913217..a20a34402 100644
--- a/gio/gdbusnameowning.c
+++ b/gio/gdbusnameowning.c
@@ -403,6 +403,7 @@ has_connection (Client *client)
g_variant_new ("(su)",
client->name,
client->flags),
+ G_VARIANT_TYPE ("(u)"),
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,
@@ -681,6 +682,7 @@ g_bus_unown_name (guint owner_id)
"org.freedesktop.DBus", /* interface name */
"ReleaseName", /* method name */
g_variant_new ("(s)", client->name),
+ G_VARIANT_TYPE ("(u)"),
G_DBUS_CALL_FLAGS_NONE,
-1,
NULL,