qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH] spice-char: fix wrong assert condition


From: Zhang Haoyu
Subject: [Qemu-devel] [PATCH] spice-char: fix wrong assert condition
Date: Sat, 17 Jan 2015 14:48:24 +0800

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 <address@hidden>
---
 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

[Prev in Thread] Current Thread [Next in Thread]