Received: from eggs.gnu.org ([2001:4830:134:3::10]:49155) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxxUk-0003Ux-HJ for qemu-devel@nongnu.org; Thu, 28 May 2015 09:05:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YxxUf-0005Ey-Eo for qemu-devel@nongnu.org; Thu, 28 May 2015 09:05:10 -0400 Received: from mail-qk0-x22e.google.com ([2607:f8b0:400d:c09::22e]:33857) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YxxUf-0005AU-As for qemu-devel@nongnu.org; Thu, 28 May 2015 09:05:05 -0400 Received: by qkoo18 with SMTP id o18so25000043qko.1 for ; Thu, 28 May 2015 06:05:04 -0700 (PDT) From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 28 May 2015 15:04:58 +0200 Message-Id: <1432818298-28987-1-git-send-email-marcandre.lureau@gmail.com> Subject: [Qemu-devel] [PATCH] spice: fix spice_chr_add_watch() pre-condition List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= , kraxel@redhat.com 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 --- 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 a4f4e57..4199bc2 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); src = (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs, sizeof(SpiceCharSource)); -- 2.1.0