[PATCH 22/22] server/red_worker: add env SPICE_NOWAIT_CLIENTS

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>

---
 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 2af212d..8dc0040 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;
 }
 
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]