[tracker/wip/carlosg/tracker-3.0-api-breaks: 39/95] libtracker-sparql: Fix handling of update_blank() results in endpoint



commit efa1ba24d6d4392f3af7f1f386d05c520e6979da
Author: Carlos Garnacho <carlosg gnome org>
Date:   Sat Dec 28 01:53:09 2019 +0100

    libtracker-sparql: Fix handling of update_blank() results in endpoint
    
    The GVariant wasn't being marshalled with the expected type.

 src/libtracker-sparql/tracker-endpoint-dbus.c | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)
---
diff --git a/src/libtracker-sparql/tracker-endpoint-dbus.c b/src/libtracker-sparql/tracker-endpoint-dbus.c
index 80b34dbe9..d4471f7e1 100644
--- a/src/libtracker-sparql/tracker-endpoint-dbus.c
+++ b/src/libtracker-sparql/tracker-endpoint-dbus.c
@@ -332,10 +332,16 @@ update_blank_cb (GObject      *object,
 
        results = tracker_sparql_connection_update_blank_finish (TRACKER_SPARQL_CONNECTION (object),
                                                                 res, &error);
-       if (results)
-               g_dbus_method_invocation_return_value (request->invocation, results);
-       else
+       if (results) {
+               GVariantBuilder builder;
+
+               g_variant_builder_init (&builder, G_VARIANT_TYPE ("(aaa{ss})"));
+               g_variant_builder_add_value (&builder, results);
+               g_dbus_method_invocation_return_value (request->invocation,
+                                                      g_variant_builder_end (&builder));
+       } else {
                g_dbus_method_invocation_return_gerror (request->invocation, error);
+       }
 
        update_request_free (request);
 }


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