Re: [spice-server 3/3] Remove unneeded red_channel_client_is_blocked() call

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

 



Hey,

On Tue, Apr 11, 2017 at 11:45:15AM -0500, Jonathon Jongsma wrote:
> On Tue, 2017-04-11 at 11:58 +0200, Christophe Fergeau wrote:
> > red_channel_client_msg_sent() always clears the
> > rcc->priv->send_data.blocked flag. Hower, towards the end of it, 
> 
> I think the description above is just a little bit misleading since it
> sort of implies that after msg_sent() returns, the blocked flag will
> always be cleared. However, if _urgent_marshaller_is_active() is true,
> it will call _begin_send_message(), which can result in blocked being
> set to true in some circumstances.
> 
> Of course, the check that you removed is in the 'else' clause of the
> branch where the flag can be set, so within that black it should be
> guaranteed to be false. So the patch itself seems fine.

I've changed this to

    Remove unneeded red_channel_client_is_blocked() call

    red_channel_client_msg_sent() calls red_channel_client_clear_sent_item()
    which will clear the rcc->priv->send_data.blocked flag. Later on, it
    contains a check for !red_channel_client_is_blocked(), which will always
    be true as nothing in between could have set it again. This commit
    removes this unneeded check.

    This check was already redundant when it was introduced in
    9a62a9a809eaf0

Is this better?

Christophe

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]