summaryrefslogtreecommitdiffstats
path: root/gdbus/object.c
diff options
context:
space:
mode:
authorLuiz Augusto von Dentz <luiz.von.dentz@intel.com>2013-08-19 15:25:57 +0300
committerMarcel Holtmann <marcel@holtmann.org>2013-09-10 19:07:28 -0700
commit6a9a09a02a63235756d11f30e966d9f807bb385f (patch)
tree14c21bc4f3f5b8f9567955ea1f0b1b6cc326bd63 /gdbus/object.c
parentf462a549f586d2baa6aa81b839d06391ff91cb6f (diff)
downloadofono-6a9a09a02a63235756d11f30e966d9f807bb385f.tar.bz2
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
Diffstat (limited to 'gdbus/object.c')
-rw-r--r--gdbus/object.c11
1 files changed, 11 insertions, 0 deletions
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)