Bug 632544 – Cannot send a locked message with PRESERVE_SERIAL flag
[platform/upstream/glib.git] / gio / gdbusconnection.c
index 7c6a2d0..809f976 100644 (file)
@@ -1452,7 +1452,8 @@ g_dbus_connection_send_message_unlocked (GDBusConnection   *connection,
   if (out_serial != NULL)
     *out_serial = serial_to_use;
 
-  g_dbus_message_set_serial (message, serial_to_use);
+  if (!(flags & G_DBUS_SEND_MESSAGE_FLAGS_PRESERVE_SERIAL))
+    g_dbus_message_set_serial (message, serial_to_use);
 
   g_dbus_message_lock (message);
   _g_dbus_worker_send_message (connection->worker,