G_IO_OUT|G_IO_HUP are passed from all of the callers
of chr_add_watch hooker, the assert condition MUST be
changed.

Signed-off-by: Zhang Haoyu <zhan...@sangfor.com.cn>
---
 spice-qemu-char.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 7e0d300..b81a9db 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -169,7 +169,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|G_IO_HUP));
 
     src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs,
                                           sizeof(SpiceCharSource));
-- 
1.7.12.4


Reply via email to