mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-01-04 00:06:29 +00:00
server: multiple clients works ok if we limit the pipe to the slowest client
Signed-off-by: Alon Levy <alon@pobox.com> Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
parent
ed1ef89ca8
commit
6e6126e024
@ -177,7 +177,7 @@ static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ri
|
|||||||
|
|
||||||
*ring_is_empty = FALSE;
|
*ring_is_empty = FALSE;
|
||||||
while (!cursor_is_connected(worker) ||
|
while (!cursor_is_connected(worker) ||
|
||||||
red_channel_min_pipe_size(RED_CHANNEL(worker->cursor_channel)) <= max_pipe_size) {
|
red_channel_max_pipe_size(RED_CHANNEL(worker->cursor_channel)) <= max_pipe_size) {
|
||||||
if (!worker->qxl->st->qif->get_cursor_command(worker->qxl, &ext_cmd)) {
|
if (!worker->qxl->st->qif->get_cursor_command(worker->qxl, &ext_cmd)) {
|
||||||
*ring_is_empty = TRUE;
|
*ring_is_empty = TRUE;
|
||||||
if (worker->cursor_poll_tries < CMD_RING_POLL_RETRIES) {
|
if (worker->cursor_poll_tries < CMD_RING_POLL_RETRIES) {
|
||||||
@ -238,8 +238,7 @@ static int red_process_display(RedWorker *worker, uint32_t max_pipe_size, int *r
|
|||||||
worker->process_display_generation++;
|
worker->process_display_generation++;
|
||||||
*ring_is_empty = FALSE;
|
*ring_is_empty = FALSE;
|
||||||
while (!display_is_connected(worker) ||
|
while (!display_is_connected(worker) ||
|
||||||
// TODO: change to average pipe size?
|
red_channel_max_pipe_size(RED_CHANNEL(worker->display_channel)) <= max_pipe_size) {
|
||||||
red_channel_min_pipe_size(RED_CHANNEL(worker->display_channel)) <= max_pipe_size) {
|
|
||||||
if (!worker->qxl->st->qif->get_command(worker->qxl, &ext_cmd)) {
|
if (!worker->qxl->st->qif->get_command(worker->qxl, &ext_cmd)) {
|
||||||
*ring_is_empty = TRUE;;
|
*ring_is_empty = TRUE;;
|
||||||
if (worker->display_poll_tries < CMD_RING_POLL_RETRIES) {
|
if (worker->display_poll_tries < CMD_RING_POLL_RETRIES) {
|
||||||
@ -447,7 +446,7 @@ static void flush_cursor_commands(RedWorker *worker)
|
|||||||
for (;;) {
|
for (;;) {
|
||||||
red_channel_push(RED_CHANNEL(worker->cursor_channel));
|
red_channel_push(RED_CHANNEL(worker->cursor_channel));
|
||||||
if (!cursor_is_connected(worker)
|
if (!cursor_is_connected(worker)
|
||||||
|| red_channel_min_pipe_size(cursor_red_channel) <= MAX_PIPE_SIZE) {
|
|| red_channel_max_pipe_size(cursor_red_channel) <= MAX_PIPE_SIZE) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
RedChannel *channel = (RedChannel *)worker->cursor_channel;
|
RedChannel *channel = (RedChannel *)worker->cursor_channel;
|
||||||
|
|||||||
@ -3348,7 +3348,7 @@ static int do_spice_init(SpiceCoreInterface *core_interface)
|
|||||||
|
|
||||||
reds->allow_multiple_clients = getenv(SPICE_DEBUG_ALLOW_MC_ENV) != NULL;
|
reds->allow_multiple_clients = getenv(SPICE_DEBUG_ALLOW_MC_ENV) != NULL;
|
||||||
if (reds->allow_multiple_clients) {
|
if (reds->allow_multiple_clients) {
|
||||||
spice_warning("spice: allowing multiple client connections (crashy)");
|
spice_warning("spice: allowing multiple client connections");
|
||||||
}
|
}
|
||||||
atexit(reds_exit);
|
atexit(reds_exit);
|
||||||
return 0;
|
return 0;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user