Re: [PATCH spice-server] red-channel-client: Rename item_in_pipe to item_sent

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

 



Looks reasonable to me

Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>



On Wed, 2017-11-29 at 17:14 +0000, Frediano Ziglio wrote:
> The name is more consistent with the value of the flag and
> the function red_channel_client_wait_pipe_item_sent where
> the MarkerPipeItem structure is used.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-channel-client.c | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/server/red-channel-client.c b/server/red-channel-
> client.c
> index f9f7186e..f154c5c6 100644
> --- a/server/red-channel-client.c
> +++ b/server/red-channel-client.c
> @@ -215,7 +215,7 @@ typedef struct RedEmptyMsgPipeItem {
>  
>  typedef struct MarkerPipeItem {
>      RedPipeItem base;
> -    bool item_in_pipe;
> +    bool item_sent;
>  } MarkerPipeItem;
>  
>  static void red_channel_client_start_ping_timer(RedChannelClient
> *rcc, uint32_t timeout)
> @@ -610,7 +610,7 @@ static void
> red_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *ite
>              red_channel_client_send_ping(rcc);
>              break;
>          case RED_PIPE_ITEM_TYPE_MARKER:
> -            SPICE_UPCAST(MarkerPipeItem, item)->item_in_pipe =
> false;
> +            SPICE_UPCAST(MarkerPipeItem, item)->item_sent = true;
>              break;
>          default:
>              red_channel_send_item(rcc->priv->channel, rcc, item);
> @@ -1772,7 +1772,7 @@ bool
> red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc,
>                                              int64_t timeout)
>  {
>      uint64_t end_time;
> -    bool item_in_pipe;
> +    bool item_sent;
>  
>      spice_debug("trace");
>  
> @@ -1785,24 +1785,24 @@ bool
> red_channel_client_wait_pipe_item_sent(RedChannelClient *rcc,
>      MarkerPipeItem *mark_item = g_new0(MarkerPipeItem, 1);
>  
>      red_pipe_item_init(&mark_item->base, RED_PIPE_ITEM_TYPE_MARKER);
> -    mark_item->item_in_pipe = true;
> +    mark_item->item_sent = false;
>      red_pipe_item_ref(&mark_item->base);
>      red_channel_client_pipe_add_before_pos(rcc, &mark_item->base,
> item_pos);
>  
>      for (;;) {
>          red_channel_client_receive(rcc);
>          red_channel_client_push(rcc);
> -        if (!mark_item->item_in_pipe ||
> +        if (mark_item->item_sent ||
>              (timeout != -1 && spice_get_monotonic_time_ns() >=
> end_time)) {
>              break;
>          }
>          usleep(CHANNEL_BLOCKED_SLEEP_DURATION);
>      }
>  
> -    item_in_pipe = mark_item->item_in_pipe;
> +    item_sent = mark_item->item_sent;
>      red_pipe_item_unref(&mark_item->base);
>  
> -    if (item_in_pipe) {
> +    if (!item_sent) {
>          // still on the queue
>          spice_warning("timeout");
>          return FALSE;
_______________________________________________
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]