From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47235) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyFcZ-0006g1-FL for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:29 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YyFcW-0005nO-8r for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:27 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34865) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YyFcW-0005n7-3t for qemu-devel@nongnu.org; Fri, 29 May 2015 04:26:24 -0400 From: Gerd Hoffmann Date: Fri, 29 May 2015 10:26:18 +0200 Message-Id: <1432887978-7411-5-git-send-email-kraxel@redhat.com> In-Reply-To: <1432887978-7411-1-git-send-email-kraxel@redhat.com> References: <1432887978-7411-1-git-send-email-kraxel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: [Qemu-devel] [PULL 4/4] 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?= , Gerd Hoffmann From: Marc-Andr=C3=A9 Lureau 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=3D1128992 Signed-off-by: Gerd Hoffmann --- 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 0f8903e..d41bb74 100644 --- a/spice-qemu-char.c +++ b/spice-qemu-char.c @@ -172,7 +172,7 @@ static GSource *spice_chr_add_watch(CharDriverState *= chr, GIOCondition cond) SpiceCharDriver *scd =3D chr->opaque; SpiceCharSource *src; =20 - assert(cond =3D=3D G_IO_OUT); + assert(cond & G_IO_OUT); =20 src =3D (SpiceCharSource *)g_source_new(&SpiceCharSourceFuncs, sizeof(SpiceCharSource)); --=20 1.8.3.1