From 6a9a09a02a63235756d11f30e966d9f807bb385f Mon Sep 17 00:00:00 2001 From: Luiz Augusto von Dentz Date: Mon, 19 Aug 2013 15:25:57 +0300 Subject: gdbus: Add g_dbus_send_message_with_reply g_dbus_send_message_with_reply flushes pending signals before calling dbus_connection_send_with_reply so it does not alter the message order --- gdbus/object.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gdbus/object.c') diff --git a/gdbus/object.c b/gdbus/object.c index 83fc4e67..773128c1 100644 --- a/gdbus/object.c +++ b/gdbus/object.c @@ -1556,6 +1556,17 @@ out: return result; } +gboolean g_dbus_send_message_with_reply(DBusConnection *connection, + DBusMessage *message, + DBusPendingCall **call, int timeout) +{ + /* Flush pending signal to guarantee message order */ + g_dbus_flush(connection); + + return dbus_connection_send_with_reply(connection, message, call, + timeout); +} + gboolean g_dbus_send_error_valist(DBusConnection *connection, DBusMessage *message, const char *name, const char *format, va_list args) -- cgit v1.2.3