[dconf] gdbus backend: handle reply_type properly



commit ce3170a3f6444ca9714bbcfd228edd372afb997b
Author: Ryan Lortie <desrt desrt ca>
Date:   Mon Nov 25 01:58:26 2013 -0500

    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.

 gdbus/dconf-gdbus-thread.c |    4 +++-
 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 ();


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]