mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-27 15:45:54 +00:00
Process outstanding commands in the ring after changing capability bits
When a new client connects, there may be commands in the ring that it can't understand, so we need to process these before forwarding new commands to the client. By doing this after changing the capability bits we ensure that the new client will never see a command that it doesn't understand (under the assumption that the guest will read and obey the capability bits). Acked-by: Alon Levy <alonl@redhat.com>
This commit is contained in:
parent
83b3e3f20d
commit
8855438ab6
@ -9478,6 +9478,11 @@ static void on_new_display_channel_client(DisplayChannelClient *dcc)
|
||||
}
|
||||
red_channel_client_ack_zero_messages_window(&dcc->common.base);
|
||||
if (worker->surfaces[0].context.canvas) {
|
||||
int ring_is_empty;
|
||||
|
||||
while (red_process_commands(worker, MAX_PIPE_SIZE, &ring_is_empty)) {
|
||||
}
|
||||
|
||||
red_current_flush(worker, 0);
|
||||
push_new_primary_surface(dcc);
|
||||
red_push_surface_image(dcc, 0);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user