[Spice-devel] [PATCH spice-server v2] Remove red_pipe_add_verb family function

Christophe Fergeau cfergeau at redhat.com
Thu Oct 27 15:34:33 UTC 2016


Hey,

On Wed, Oct 26, 2016 at 09:45:15AM +0100, Frediano Ziglio wrote:
> These functions were implementing the same stuff as empty
> messages functions provided by RedChannel so reuse them.
> 
> The implementation seems a bit different but the result
> is the same. Specifically:
> - RedEmptyMsgPipeItem::msg is int while RedVerbItem::verb was
>   uint16_t however this data goes into the message type which
>   is uint16_t (a 16 bit on the network protocol);

> - red_channel_client_send_empty_msg calls
>   red_channel_client_begin_send_message while red_marshall_verb
>   not. However red_marshall_verb calls are followed by either

I think you are missing a "does" -> "while red_marshall_verb does not"

>   cursor_channel_send_item or dcc_send_item which always
>   call red_channel_client_begin_send_message.

"always sent" I think.

>   Note that in dcc_send_item when an empty message is sent
>   red_channel_client_send_message_pending always returns
>   true;

I think this is not exactly true, the red_marshall_verb calls are done
from cursor_channel_send_item or dcc_send_item, which end with a call to
red_channel_client_begin_send_message()


> - when a PipeItem is created red_channel_client_pipe_add_empty_msg
>   calls red_channel_client_push while red_pipe_add_verb does not.
>   This actually make very few difference as this kind of item are
>   never removed from the queue and a push is forced in every case
>   running the event handler for the stream watch (see
>   prepare_pipe_add and red_channel_client_event).

I guess this could change the timing of receiving these messages? Ie
they could be received a bit earlier than before? Probably not
important.
There is still the "few difference" -> "little difference"

The patch itself looks good to me.


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

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/20161027/a0887dd4/attachment-0001.sig>


More information about the Spice-devel mailing list