[Spice-devel] [PATCH 15/15] server/red_worker: add env SPICE_NOWAIT_CLIENTS

Frediano Ziglio fziglio at redhat.com
Thu Dec 3 08:32:50 PST 2015


> 
> From: Marc-André Lureau <marcandre.lureau at gmail.com>
> 
> ---
>  server/red-worker.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/server/red-worker.c b/server/red-worker.c
> index 71d18b7..49d5aa2 100644
> --- a/server/red-worker.c
> +++ b/server/red-worker.c
> @@ -87,6 +87,7 @@ struct RedWorker {
>      int driver_cap_monitors_config;
>  
>      FILE *record_fd;
> +    bool wait_for_clients;
>  };
>  
>  GMainContext* red_worker_get_context(RedWorker *worker)
> @@ -245,7 +246,7 @@ static int red_process_display(RedWorker *worker,
> uint32_t max_pipe_size, int *r
>      *ring_is_empty = FALSE;
>      for (;;) {
>  
> -        if (display_is_connected(worker)) {
> +        if (display_is_connected(worker) && worker->wait_for_clients) {
>  
>              if
>              (red_channel_all_blocked(RED_CHANNEL(worker->display_channel)))
>              {
>                  spice_info("all display clients are blocking");
> @@ -1754,6 +1755,8 @@ RedWorker* red_worker_new(QXLInstance *qxl,
> RedDispatcher *red_dispatcher)
>      worker->display_channel = display_channel_new(worker, FALSE,
>      streaming_video,
>                                                    init_info.n_surfaces);
>  
> +    worker->wait_for_clients = !g_getenv("SPICE_NOWAIT_CLIENTS");
> +
>      return worker;
>  }
>  

Nack this patch

Frediano


More information about the Spice-devel mailing list