From ecc34bb2c75d4b216bcac310d0df3332a195a2a8 Mon Sep 17 00:00:00 2001 From: Dietmar Maurer Date: Wed, 11 Dec 2013 08:51:45 +0100 Subject: [PATCH] avoid warning when started with 0 timeout --- screen.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/screen.c b/screen.c index ff42b38..c996566 100644 --- a/screen.c +++ b/screen.c @@ -819,8 +819,10 @@ spice_screen_new(SpiceCoreInterface *core, uint32_t width, uint32_t height, cursor_init(); - spice_screen->conn_timeout_timer = core->timer_add(do_conn_timeout, spice_screen); - spice_screen->core->timer_start(spice_screen->conn_timeout_timer, opts->timeout*1000); + if (opts->timeout > 0) { + spice_screen->conn_timeout_timer = core->timer_add(do_conn_timeout, spice_screen); + spice_screen->core->timer_start(spice_screen->conn_timeout_timer, opts->timeout*1000); + } spice_server_add_interface(spice_screen->server, &spice_screen->qxl_instance.base); -- 2.39.2