[Spice-devel] [spice-server 3/3] Remove unneeded red_channel_client_is_blocked() call
Christophe Fergeau
cfergeau at redhat.com
Wed Apr 26 16:07:07 UTC 2017
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20170426/833821bf/attachment.sig>
More information about the Spice-devel
mailing list