[Spice-devel] [PATCHv2 01/10] channel: delay event report to after coroutine exit

Marc-André Lureau mlureau at redhat.com
Tue Jan 27 08:25:19 PST 2015


done

----- Original Message -----
> On Tue, Jan 27, 2015 at 02:53:14PM +0100, Marc-André Lureau wrote:
> > @@ -2157,9 +2156,8 @@ static gboolean spice_channel_iterate(SpiceChannel
> > *channel)
> >          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);
> > +                c->event = c->state == SPICE_CHANNEL_STATE_READY ?
> > +                    SPICE_CHANNEL_ERROR_IO : SPICE_CHANNEL_ERROR_LINK;
> 
> if (c->state == SPICE_CHANNEL_STATE_READY)
>     c->event = SPICE_CHANNEL_ERROR_IO;
> else
>     c->event = SPICE_CHANNEL_ERROR_LINK;
> 
> would be much more readable imo.
> ACK apart from this.
> 
> Christophe
> 


More information about the Spice-devel mailing list