Re: [PATCH spice-server 2/2] red-channel-client: Use bool type for config_socket

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

 



I intend to send
https://cgit.freedesktop.org/~teuf/spice/commit/?h=vfuncs&id=b393b04acbdb43
real soon now (need to test it), which is much more extensive than what
is done in this patch, do you mind postponing/dropping this version?

That consideration aside, this patch looks good to me.

Christophe

On Wed, Mar 08, 2017 at 11:27:57AM +0000, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/common-graphics-channel.c | 4 ++--
>  server/common-graphics-channel.h | 2 +-
>  server/dcc.c                     | 4 ++--
>  server/red-channel-client.c      | 6 +++---
>  server/red-channel-client.h      | 2 +-
>  server/sound.c                   | 4 ++--
>  6 files changed, 11 insertions(+), 11 deletions(-)
> 
> diff --git a/server/common-graphics-channel.c b/server/common-graphics-channel.c
> index eedd36f..b98276f 100644
> --- a/server/common-graphics-channel.c
> +++ b/server/common-graphics-channel.c
> @@ -120,7 +120,7 @@ common_graphics_channel_set_property(GObject *object,
>      }
>  }
>  
> -int common_channel_client_config_socket(RedChannelClient *rcc)
> +bool common_channel_client_config_socket(RedChannelClient *rcc)
>  {
>      RedClient *client = red_channel_client_get_client(rcc);
>      MainChannelClient *mcc = red_client_get_main(client);
> @@ -147,7 +147,7 @@ int common_channel_client_config_socket(RedChannelClient *rcc)
>      red_channel_client_ack_set_client_window(rcc,
>          is_low_bandwidth ?
>          WIDE_CLIENT_ACK_WINDOW : NARROW_CLIENT_ACK_WINDOW);
> -    return TRUE;
> +    return true;
>  }
>  
>  
> diff --git a/server/common-graphics-channel.h b/server/common-graphics-channel.h
> index ae6aac2..5f45c2c 100644
> --- a/server/common-graphics-channel.h
> +++ b/server/common-graphics-channel.h
> @@ -25,7 +25,7 @@
>  
>  G_BEGIN_DECLS
>  
> -int common_channel_client_config_socket(RedChannelClient *rcc);
> +bool common_channel_client_config_socket(RedChannelClient *rcc);
>  
>  #define COMMON_CLIENT_TIMEOUT (NSEC_PER_SEC * 30)
>  
> diff --git a/server/dcc.c b/server/dcc.c
> index ee8709c..2747494 100644
> --- a/server/dcc.c
> +++ b/server/dcc.c
> @@ -41,7 +41,7 @@ enum
>  };
>  
>  static void on_display_video_codecs_update(GObject *gobject, GParamSpec *pspec, gpointer user_data);
> -static int dcc_config_socket(RedChannelClient *rcc);
> +static bool dcc_config_socket(RedChannelClient *rcc);
>  
>  static void
>  display_channel_client_get_property(GObject *object,
> @@ -1421,7 +1421,7 @@ void dcc_set_max_stream_bit_rate(DisplayChannelClient *dcc, uint64_t rate)
>      dcc->priv->streams_max_bit_rate = rate;
>  }
>  
> -static int dcc_config_socket(RedChannelClient *rcc)
> +static bool dcc_config_socket(RedChannelClient *rcc)
>  {
>      RedClient *client = red_channel_client_get_client(rcc);
>      MainChannelClient *mcc = red_client_get_main(client);
> diff --git a/server/red-channel-client.c b/server/red-channel-client.c
> index b7e902c..0782b8e 100644
> --- a/server/red-channel-client.c
> +++ b/server/red-channel-client.c
> @@ -158,7 +158,7 @@ static const SpiceDataHeaderOpaque mini_header_wrapper;
>  static void red_channel_client_clear_sent_item(RedChannelClient *rcc);
>  static void red_channel_client_initable_interface_init(GInitableIface *iface);
>  static void red_channel_client_set_message_serial(RedChannelClient *channel, uint64_t);
> -static int red_channel_client_config_socket(RedChannelClient *rcc);
> +static bool red_channel_client_config_socket(RedChannelClient *rcc);
>  
>  /*
>   * When an error occurs over a channel, we treat it as a warning
> @@ -1054,12 +1054,12 @@ void red_channel_client_shutdown(RedChannelClient *rcc)
>      }
>  }
>  
> -static int red_channel_client_config_socket(RedChannelClient *rcc)
> +static bool red_channel_client_config_socket(RedChannelClient *rcc)
>  {
>      RedChannelClientClass *klass = RED_CHANNEL_CLIENT_GET_CLASS(rcc);
>  
>      if (!klass->config_socket) {
> -        return TRUE;
> +        return true;
>      }
>  
>      return klass->config_socket(rcc);
> diff --git a/server/red-channel-client.h b/server/red-channel-client.h
> index b1b29d7..7d945df 100644
> --- a/server/red-channel-client.h
> +++ b/server/red-channel-client.h
> @@ -170,7 +170,7 @@ struct RedChannelClientClass
>      GObjectClass parent_class;
>  
>      /* configure socket connected to the client */
> -    int (*config_socket)(RedChannelClient *rcc);
> +    bool (*config_socket)(RedChannelClient *rcc);
>      uint8_t *(*alloc_recv_buf)(RedChannelClient *channel, uint16_t type, uint32_t size);
>      void (*release_recv_buf)(RedChannelClient *channel, uint16_t type, uint32_t size, uint8_t *msg);
>  };
> diff --git a/server/sound.c b/server/sound.c
> index b745cdb..11d9bc9 100644
> --- a/server/sound.c
> +++ b/server/sound.c
> @@ -732,7 +732,7 @@ static void record_channel_send_item(RedChannelClient *rcc, G_GNUC_UNUSED RedPip
>      snd_send(client);
>  }
>  
> -static int snd_channel_client_config_socket(RedChannelClient *rcc)
> +static bool snd_channel_client_config_socket(RedChannelClient *rcc)
>  {
>      int delay_val;
>  #ifdef SO_PRIORITY
> @@ -767,7 +767,7 @@ static int snd_channel_client_config_socket(RedChannelClient *rcc)
>          }
>      }
>  
> -    return TRUE;
> +    return true;
>  }
>  
>  static void snd_channel_on_disconnect(RedChannelClient *rcc)
> -- 
> 2.9.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
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]