Re: [PATCH 3.5/12] Change red_marshall_verb() to accept a VerbItem

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

 



> 
> From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
> 
> Instead of passing a verb enumeration value, pass the verb pipe item
> 
> Signed-off-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
> ---
>  server/cursor-channel.c | 4 ++--
>  server/red_worker.c     | 4 ++--
>  server/red_worker.h     | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/server/cursor-channel.c b/server/cursor-channel.c
> index 2ea00c8..ad0998e 100644
> --- a/server/cursor-channel.c
> +++ b/server/cursor-channel.c
> @@ -314,7 +314,7 @@ static void cursor_channel_send_item(RedChannelClient
> *rcc, PipeItem *pipe_item)
>          red_cursor_marshall_inval(rcc, m, (CacheItem *)pipe_item);
>          break;
>      case PIPE_ITEM_TYPE_VERB:
> -        red_marshall_verb(rcc, ((VerbItem*)pipe_item)->verb);
> +        red_marshall_verb(rcc, (VerbItem*)pipe_item);
>          break;
>      case PIPE_ITEM_TYPE_CURSOR_INIT:
>          red_reset_cursor_cache(rcc);
> @@ -322,7 +322,7 @@ static void cursor_channel_send_item(RedChannelClient
> *rcc, PipeItem *pipe_item)
>          break;
>      case PIPE_ITEM_TYPE_INVAL_CURSOR_CACHE:
>          red_reset_cursor_cache(rcc);
> -        red_marshall_verb(rcc, SPICE_MSG_CURSOR_INVAL_ALL);
> +        red_channel_client_init_send_data(rcc, SPICE_MSG_CURSOR_INVAL_ALL,
> NULL);
>          break;
>      default:
>          spice_error("invalid pipe item type");
> diff --git a/server/red_worker.c b/server/red_worker.c
> index 7b3eee2..0631efb 100644
> --- a/server/red_worker.c
> +++ b/server/red_worker.c
> @@ -8392,7 +8392,7 @@ static void display_channel_send_item(RedChannelClient
> *rcc, PipeItem *pipe_item
>          red_display_marshall_upgrade(rcc, m, (UpgradeItem *)pipe_item);
>          break;
>      case PIPE_ITEM_TYPE_VERB:
> -        red_marshall_verb(rcc, ((VerbItem*)pipe_item)->verb);
> +        red_marshall_verb(rcc, (VerbItem*)pipe_item);
>          break;
>      case PIPE_ITEM_TYPE_MIGRATE_DATA:
>          display_channel_marshall_migrate_data(rcc, m);
> @@ -8408,7 +8408,7 @@ static void display_channel_send_item(RedChannelClient
> *rcc, PipeItem *pipe_item
>          break;
>      case PIPE_ITEM_TYPE_INVAL_PALETTE_CACHE:
>          red_reset_palette_cache(dcc);
> -        red_marshall_verb(rcc, SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES);
> +        red_channel_client_init_send_data(rcc,
> SPICE_MSG_DISPLAY_INVAL_ALL_PALETTES, NULL);
>          break;
>      case PIPE_ITEM_TYPE_CREATE_SURFACE: {
>          SurfaceCreateItem *surface_create = SPICE_CONTAINEROF(pipe_item,
>          SurfaceCreateItem,
> diff --git a/server/red_worker.h b/server/red_worker.h
> index 502283e..c828d99 100644
> --- a/server/red_worker.h
> +++ b/server/red_worker.h
> @@ -74,10 +74,10 @@ typedef struct VerbItem {
>      uint16_t verb;
>  } VerbItem;
>  
> -static inline void red_marshall_verb(RedChannelClient *rcc, uint16_t verb)
> +static inline void red_marshall_verb(RedChannelClient *rcc, VerbItem *item)
>  {
>      spice_assert(rcc);
> -    red_channel_client_init_send_data(rcc, verb, NULL);
> +    red_channel_client_init_send_data(rcc, item->verb, NULL);
>  }
>  
>  static inline void red_pipe_add_verb(RedChannelClient* rcc, uint16_t verb)
> --
> 2.4.3
> 

Acked

Frediano
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://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]