[Spice-devel] [PATCH 09/11] Remove 'peer' from name of channel client methods

Frediano Ziglio fziglio at redhat.com
Fri May 13 14:27:02 UTC 2016


> 
> There is some inconsistent naming of RedChannelClient methods. Some
> include the word 'peer' (which normally seems to refer to RedsStream).
> Remove the 'peer' terminology from those functions that are basically
> RedChannelClient methods.
> ---
>  server/red-channel.c | 18 +++++++++---------
>  1 file changed, 9 insertions(+), 9 deletions(-)
> 
> diff --git a/server/red-channel.c b/server/red-channel.c
> index 0d402e3..8110b36 100644
> --- a/server/red-channel.c
> +++ b/server/red-channel.c
> @@ -405,15 +405,15 @@ static void
> red_channel_client_default_peer_on_error(RedChannelClient *rcc)
>      red_channel_client_disconnect(rcc);
>  }
>  
> -static int red_channel_client_peer_get_out_msg_size(void *opaque)
> +static int red_channel_client_get_out_msg_size(void *opaque)
>  {
>      RedChannelClient *rcc = (RedChannelClient *)opaque;
>  
>      return rcc->send_data.size;
>  }
>  
> -static void red_channel_client_peer_prepare_out_msg(
> -    void *opaque, struct iovec *vec, int *vec_size, int pos)
> +static void red_channel_client_prepare_out_msg(void *opaque, struct iovec
> *vec,
> +                                               int *vec_size, int pos)
>  {
>      RedChannelClient *rcc = (RedChannelClient *)opaque;
>  
> @@ -421,7 +421,7 @@ static void red_channel_client_peer_prepare_out_msg(
>                                              vec, IOV_MAX, pos);
>  }
>  
> -static void red_channel_client_peer_on_out_block(void *opaque)
> +static void red_channel_client_on_out_block(void *opaque)
>  {
>      RedChannelClient *rcc = (RedChannelClient *)opaque;
>  
> @@ -597,7 +597,7 @@ static inline void
> red_channel_client_release_sent_item(RedChannelClient *rcc)
>      }
>  }
>  
> -static void red_channel_peer_on_out_msg_done(void *opaque)
> +static void red_channel_client_on_out_msg_done(void *opaque)
>  {
>      RedChannelClient *rcc = (RedChannelClient *)opaque;
>      int fd;
> @@ -1054,12 +1054,12 @@ RedChannel *red_channel_create(int size,
>      channel->incoming_cb.on_error =
>          (on_incoming_error_proc)red_channel_client_default_peer_on_error;
>      channel->incoming_cb.on_input = red_channel_client_on_input;
> -    channel->outgoing_cb.get_msg_size =
> red_channel_client_peer_get_out_msg_size;
> -    channel->outgoing_cb.prepare = red_channel_client_peer_prepare_out_msg;
> -    channel->outgoing_cb.on_block = red_channel_client_peer_on_out_block;
> +    channel->outgoing_cb.get_msg_size = red_channel_client_get_out_msg_size;
> +    channel->outgoing_cb.prepare = red_channel_client_prepare_out_msg;
> +    channel->outgoing_cb.on_block = red_channel_client_on_out_block;
>      channel->outgoing_cb.on_error =
>          (on_outgoing_error_proc)red_channel_client_default_peer_on_error;
> -    channel->outgoing_cb.on_msg_done = red_channel_peer_on_out_msg_done;
> +    channel->outgoing_cb.on_msg_done = red_channel_client_on_out_msg_done;
>      channel->outgoing_cb.on_output = red_channel_client_on_output;
>  
>      client_cbs.connect = red_channel_client_default_connect;

Acked-by: Frediano Ziglio <fziglio at redhat.com>

Frediano


More information about the Spice-devel mailing list