Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Mon, Sep 15, 2014 at 8:56 AM, Christophe Fergeau wrote: > On Fri, Sep 12, 2014 at 06:52:07PM +0100, Zeeshan Ali (Khattak) wrote: >> Anyone up for review? It would be nice to get this in and (if >> possible) even released before GNOME's code freeze break on Wednesday. >> Won't be bad if release before 3.14 release in two weeks either. > > For what it's worth, spice-gtk is not really following GNOME release > cycle, and even less its various freezes. I'll see what we can do with > respect to releasing. Yeah, I know but I was hoping some exceptions could be made here for our dear Boxes project. :) BTW, wouldn't be a bad idea for spice to follow GNOME release cycles, unless its following another project's release cycle already. -- Regards, Zeeshan Ali (Khattak) Befriend GNOME: http://www.gnome.org/friends/ ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Fri, Sep 12, 2014 at 06:52:07PM +0100, Zeeshan Ali (Khattak) wrote: > Anyone up for review? It would be nice to get this in and (if > possible) even released before GNOME's code freeze break on Wednesday. > Won't be bad if release before 3.14 release in two weeks either. For what it's worth, spice-gtk is not really following GNOME release cycle, and even less its various freezes. I'll see what we can do with respect to releasing. Christophe pgpizJA20yxHZ.pgp Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Fri, Sep 12, 2014 at 7:20 PM, Fabiano FidĂȘncio wrote: > > > On Fri, Sep 12, 2014 at 7:52 PM, Zeeshan Ali (Khattak) > wrote: >> >> On Wed, Sep 10, 2014 at 3:52 PM, Zeeshan Ali (Khattak) >> wrote: >> > On Wed, Sep 10, 2014 at 3:35 PM, Christophe Fergeau >> > wrote: >> >> Since commit 9cf9ca434, spice_channel_iterate() will report a >> >> SPICE_CHANNEL_ERROR_IO error to library users when >> >> SpiceChannel::has_error is set. In particular, when the server side >> >> closes its SPICE sockets because the VM is being shut down, an IO error >> >> will get reported. Prior to this change, a channel-closed event was >> >> reported on graceful VM shutdowns as there was >> >> a g_socket_condition_check() guarding the emission of the IO error >> >> signal. >> >> >> >> This commit readds the g_socket_condition_check() test, but only when >> >> SpiceChannel::has_error is set. >> >> >> >> This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692 >> >> --- >> > >> > Just wanted to say that I tested this patch and it fixes the bug above. >> >> Anyone up for review? It would be nice to get this in and (if >> possible) even released before GNOME's code freeze break on Wednesday. >> Won't be bad if release before 3.14 release in two weeks either. > > > > I have considered your previous comment as an ACK. You shouldn't, unless I explicitly use the term ACK (or mark patch as commit* on bz). I'm not really a spice hacker to be able to ACK patches. > Anyway, ACK! Thanks. :) -- Regards, Zeeshan Ali (Khattak) Befriend GNOME: http://www.gnome.org/friends/ ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Fri, Sep 12, 2014 at 7:52 PM, Zeeshan Ali (Khattak) wrote: > On Wed, Sep 10, 2014 at 3:52 PM, Zeeshan Ali (Khattak) > wrote: > > On Wed, Sep 10, 2014 at 3:35 PM, Christophe Fergeau > wrote: > >> Since commit 9cf9ca434, spice_channel_iterate() will report a > >> SPICE_CHANNEL_ERROR_IO error to library users when > >> SpiceChannel::has_error is set. In particular, when the server side > >> closes its SPICE sockets because the VM is being shut down, an IO error > >> will get reported. Prior to this change, a channel-closed event was > >> reported on graceful VM shutdowns as there was > >> a g_socket_condition_check() guarding the emission of the IO error > >> signal. > >> > >> This commit readds the g_socket_condition_check() test, but only when > >> SpiceChannel::has_error is set. > >> > >> This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692 > >> --- > > > > Just wanted to say that I tested this patch and it fixes the bug above. > > Anyone up for review? It would be nice to get this in and (if > possible) even released before GNOME's code freeze break on Wednesday. > Won't be bad if release before 3.14 release in two weeks either. > I have considered your previous comment as an ACK. Anyway, ACK! Best Regards, -- Fabiano FidĂȘncio ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Wed, Sep 10, 2014 at 3:52 PM, Zeeshan Ali (Khattak) wrote: > On Wed, Sep 10, 2014 at 3:35 PM, Christophe Fergeau > wrote: >> Since commit 9cf9ca434, spice_channel_iterate() will report a >> SPICE_CHANNEL_ERROR_IO error to library users when >> SpiceChannel::has_error is set. In particular, when the server side >> closes its SPICE sockets because the VM is being shut down, an IO error >> will get reported. Prior to this change, a channel-closed event was >> reported on graceful VM shutdowns as there was >> a g_socket_condition_check() guarding the emission of the IO error >> signal. >> >> This commit readds the g_socket_condition_check() test, but only when >> SpiceChannel::has_error is set. >> >> This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692 >> --- > > Just wanted to say that I tested this patch and it fixes the bug above. Anyone up for review? It would be nice to get this in and (if possible) even released before GNOME's code freeze break on Wednesday. Won't be bad if release before 3.14 release in two weeks either. -- Regards, Zeeshan Ali (Khattak) Befriend GNOME: http://www.gnome.org/friends/ ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
On Wed, Sep 10, 2014 at 3:35 PM, Christophe Fergeau wrote: > Since commit 9cf9ca434, spice_channel_iterate() will report a > SPICE_CHANNEL_ERROR_IO error to library users when > SpiceChannel::has_error is set. In particular, when the server side > closes its SPICE sockets because the VM is being shut down, an IO error > will get reported. Prior to this change, a channel-closed event was > reported on graceful VM shutdowns as there was > a g_socket_condition_check() guarding the emission of the IO error > signal. > > This commit readds the g_socket_condition_check() test, but only when > SpiceChannel::has_error is set. > > This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692 > --- Just wanted to say that I tested this patch and it fixes the bug above. -- Regards, Zeeshan Ali (Khattak) Befriend GNOME: http://www.gnome.org/friends/ ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel
[Spice-devel] [spice-gtk] Don't report IO error on clean guest shutdown
Since commit 9cf9ca434, spice_channel_iterate() will report a SPICE_CHANNEL_ERROR_IO error to library users when SpiceChannel::has_error is set. In particular, when the server side closes its SPICE sockets because the VM is being shut down, an IO error will get reported. Prior to this change, a channel-closed event was reported on graceful VM shutdowns as there was a g_socket_condition_check() guarding the emission of the IO error signal. This commit readds the g_socket_condition_check() test, but only when SpiceChannel::has_error is set. This fixes https://bugs.freedesktop.org/show_bug.cgi?id=83692 --- gtk/spice-channel.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/gtk/spice-channel.c b/gtk/spice-channel.c index b27a672..4ca930a 100644 --- a/gtk/spice-channel.c +++ b/gtk/spice-channel.c @@ -2123,11 +2123,18 @@ static gboolean spice_channel_iterate(SpiceChannel *channel) SPICE_CHANNEL_GET_CLASS(channel)->iterate_read(channel); if (c->has_error) { -CHANNEL_DEBUG(channel, "channel got error"); -if (c->state > SPICE_CHANNEL_STATE_CONNECTING) -g_coroutine_signal_emit(channel, signals[SPICE_CHANNEL_EVENT], 0, -c->state == SPICE_CHANNEL_STATE_READY ? -SPICE_CHANNEL_ERROR_IO : SPICE_CHANNEL_ERROR_LINK); +GIOCondition ret; +/* We don't want to report an error if the socket was closed gracefully + * on the other end (VM shutdown) */ +ret = g_socket_condition_check(c->sock, G_IO_IN | G_IO_ERR | G_IO_HUP); +if (ret & (G_IO_ERR|G_IO_HUP)) { +CHANNEL_DEBUG(channel, "channel got error"); +if (c->state > SPICE_CHANNEL_STATE_CONNECTING) { +g_coroutine_signal_emit(channel, signals[SPICE_CHANNEL_EVENT], 0, +c->state == SPICE_CHANNEL_STATE_READY ? +SPICE_CHANNEL_ERROR_IO : SPICE_CHANNEL_ERROR_LINK); +} +} return FALSE; } -- 1.9.3 ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/spice-devel