From bfdde4d94759666c2bd2da5632620e95da8c9214 Mon Sep 17 00:00:00 2001 From: Pavel Grunt Date: Wed, 16 Mar 2016 14:46:51 +0100 Subject: [PATCH 1/5] display: Lower level of warning for empty monitor config It is a valid case when a guest requests to turn off monitors, eg: xrandr --output Virtual-0 --off Related: https://bugzilla.redhat.com/show_bug.cgi?id=1061942 Acked-by: Frediano Ziglio (cherry picked from commit c0c721bbaae50d3ad1991d22df1c4397f24f7acb) --- src/channel-display.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/channel-display.c b/src/channel-display.c index 442642a..0ae84a0 100644 --- a/src/channel-display.c +++ b/src/channel-display.c @@ -1846,7 +1846,11 @@ static void display_handle_monitors_config(SpiceChannel *channel, SpiceMsgIn *in guint i; g_return_if_fail(config != NULL); - g_return_if_fail(config->count > 0); + + if (config->count == 0) { + CHANNEL_DEBUG(channel, "received empty monitor config"); + return; + } CHANNEL_DEBUG(channel, "received new monitors config from guest: n: %d/%d", config->count, config->max_allowed); -- 2.8.1