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

[Xen-changelog] [qemu-upstream-unstable] spice: fix spice_chr_add_watch() pre-condition



commit c3eb5b77be3c731c2ecd6eddab403bb8dabc135a
Author:     Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
AuthorDate: Thu May 28 15:04:58 2015 +0200
Commit:     Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
CommitDate: Mon Jul 20 11:26:15 2015 +0000

    spice: fix spice_chr_add_watch() pre-condition

    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

    upstream-commit-id: f7a8beb5e6a13dc924895244777d9ef08b23b367

    Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxxxxx>
    Signed-off-by: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
---
 spice-qemu-char.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/spice-qemu-char.c b/spice-qemu-char.c
index 8106e06..b436532 100644
--- a/spice-qemu-char.c
+++ b/spice-qemu-char.c
@@ -170,7 +170,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));
--
generated by git-patchbot for /home/xen/git/qemu-upstream-unstable.git

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.