mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
GDBus: Only rewrite serial number if g_dbus_message_get_serial() returns 0
While this a dangerous thing to allow (collissions, reply_serial not matching up etc.), the added flexibility makes this a good trade-off - for example, with this feature, it's now a lot easier to build message routers. Signed-off-by: David Zeuthen <davidz@redhat.com>
This commit is contained in:
@@ -618,12 +618,14 @@ test_connection_filter (void)
|
||||
while (data.num_handled == 0)
|
||||
g_thread_yield ();
|
||||
|
||||
g_dbus_message_set_serial (m, 0);
|
||||
g_dbus_connection_send_message (c, m, &data.serial, &error);
|
||||
g_assert_no_error (error);
|
||||
|
||||
while (data.num_handled == 1)
|
||||
g_thread_yield ();
|
||||
|
||||
g_dbus_message_set_serial (m, 0);
|
||||
r = g_dbus_connection_send_message_with_reply_sync (c,
|
||||
m,
|
||||
-1,
|
||||
@@ -637,6 +639,7 @@ test_connection_filter (void)
|
||||
|
||||
g_dbus_connection_remove_filter (c, filter_id);
|
||||
|
||||
g_dbus_message_set_serial (m, 0);
|
||||
r = g_dbus_connection_send_message_with_reply_sync (c,
|
||||
m,
|
||||
-1,
|
||||
|
Reference in New Issue
Block a user