summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-11-25 01:58:26 -0500
committerRyan Lortie <desrt@desrt.ca>2013-11-25 12:23:16 -0500
commitce3170a3f6444ca9714bbcfd228edd372afb997b (patch)
tree8fb1acb3d15f83dadf24daf4da23598e0d66079c
parentfde10b3cb89918b3890f3902dd571eee94a7a508 (diff)
downloaddconf-ce3170a3f6444ca9714bbcfd228edd372afb997b.tar.gz
gdbus backend: handle reply_type properly
The test coverage report turned up some dead code in the engine as a result of the gdbus backend not properly checking the return type of D-Bus messages. Fix that up.
-rw-r--r--gdbus/dconf-gdbus-thread.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdbus/dconf-gdbus-thread.c b/gdbus/dconf-gdbus-thread.c
index b962d69..4d134d4 100644
--- a/gdbus/dconf-gdbus-thread.c
+++ b/gdbus/dconf-gdbus-thread.c
@@ -69,6 +69,7 @@ typedef struct
const gchar *interface_name;
const gchar *method_name;
GVariant *parameters;
+ const GVariantType *expected_type;
DConfEngineCallHandle *handle;
} DConfGDBusCall;
@@ -245,7 +246,7 @@ dconf_gdbus_method_call (gpointer user_data)
if (connection)
g_dbus_connection_call (connection, call->bus_name, call->object_path, call->interface_name,
- call->method_name, call->parameters, NULL, G_DBUS_CALL_FLAGS_NONE,
+ call->method_name, call->parameters, call->expected_type, G_DBUS_CALL_FLAGS_NONE,
-1, NULL, dconf_gdbus_method_call_done, call->handle);
else
@@ -277,6 +278,7 @@ dconf_engine_dbus_call_async_func (GBusType bus_type,
call->interface_name = interface_name;
call->method_name = method_name;
call->parameters = g_variant_ref_sink (parameters);
+ call->expected_type = dconf_engine_call_handle_get_expected_type (handle);
call->handle = handle;
source = g_idle_source_new ();