spice: fix spice_chr_add_watch() pre-condition

Since e02bc6de30, 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

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Marc-André Lureau 2015-05-28 15:04:58 +02:00 committed by Gerd Hoffmann
parent 641381c1fc
commit f7a8beb5e6

View File

@ -172,7 +172,7 @@ static GSource *spice_chr_add_watch(CharDriverState *chr, GIOCondition cond)
SpiceCharDriver *scd = chr->opaque; SpiceCharDriver *scd = chr->opaque;
SpiceCharSource *src; SpiceCharSource *src;
assert(cond == G_IO_OUT); assert(cond & G_IO_OUT);
src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs, src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs,
sizeof(SpiceCharSource)); sizeof(SpiceCharSource));