From: Marc-André Lureau Date: Thu, 28 May 2015 13:04:58 +0000 (+0200) Subject: spice: fix spice_chr_add_watch() pre-condition X-Git-Tag: qemu-xen-4.5.2~16 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=eb75549f69ca0f3eab26ed39d4ad0fcb6613f64a;p=qemu-upstream-4.5-testing.git spice: fix spice_chr_add_watch() pre-condition Since e02bc6de30c44fd668dc0d6e1cd1804f2eed3ed3, add_watch() is called with G_IO_HUP. Even if spice-qemu-char ignores this flag, the precondition must be changed. https://bugzilla.redhat.com/show_bug.cgi?id=1128992 upstream-commit-id: f7a8beb5e6a13dc924895244777d9ef08b23b367 Signed-off-by: Gerd Hoffmann Signed-off-by: Stefano Stabellini --- diff --git a/spice-qemu-char.c b/spice-qemu-char.c index 662455995..99eb1bf6b 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -170,7 +170,7 @@ static GSource *spice_chr_add_watch(CharDriverState *chr, GIOCondition cond) SpiceCharDriver *scd = chr->opaque; SpiceCharSource *src; - assert(cond == G_IO_OUT); + assert(cond & G_IO_OUT); src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs, sizeof(SpiceCharSource));