Re: [PATCH spice-server 2/5] red-stream: Propagate RedStreamSslStatus type

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

 



Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

On Tue, Oct 09, 2018 at 09:30:03AM +0100, Frediano Ziglio wrote:
> Do not convert RedStreamSslStatus enumeration type back to int.
> This allows compilers to perform some more type safe checks.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-stream.c | 2 +-
>  server/red-stream.h | 2 +-
>  server/reds.c       | 4 ++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/server/red-stream.c b/server/red-stream.c
> index 18c4a935..fd5b8cd1 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -506,7 +506,7 @@ RedStreamSslStatus red_stream_ssl_accept(RedStream *stream)
>      return RED_STREAM_SSL_STATUS_ERROR;
>  }
>  
> -int red_stream_enable_ssl(RedStream *stream, SSL_CTX *ctx)
> +RedStreamSslStatus red_stream_enable_ssl(RedStream *stream, SSL_CTX *ctx)
>  {
>      BIO *sbio;
>  
> diff --git a/server/red-stream.h b/server/red-stream.h
> index 15af0a59..9a7cc617 100644
> --- a/server/red-stream.h
> +++ b/server/red-stream.h
> @@ -62,7 +62,7 @@ RedStream *red_stream_new(RedsState *reds, int socket);
>  void red_stream_set_core_interface(RedStream *stream, SpiceCoreInterfaceInternal *core);
>  bool red_stream_is_ssl(RedStream *stream);
>  RedStreamSslStatus red_stream_ssl_accept(RedStream *stream);
> -int red_stream_enable_ssl(RedStream *stream, SSL_CTX *ctx);
> +RedStreamSslStatus red_stream_enable_ssl(RedStream *stream, SSL_CTX *ctx);
>  int red_stream_get_family(const RedStream *stream);
>  bool red_stream_is_plain_unix(const RedStream *stream);
>  bool red_stream_set_no_delay(RedStream *stream, bool no_delay);
> diff --git a/server/reds.c b/server/reds.c
> index 80a1ae34..ec9f9258 100644
> --- a/server/reds.c
> +++ b/server/reds.c
> @@ -2354,7 +2354,7 @@ static void reds_handle_ssl_accept(int fd, int event, void *data)
>  {
>      RedLinkInfo *link = (RedLinkInfo *)data;
>      RedsState *reds = link->reds;
> -    int return_code = red_stream_ssl_accept(link->stream);
> +    RedStreamSslStatus return_code = red_stream_ssl_accept(link->stream);
>  
>      switch (return_code) {
>          case RED_STREAM_SSL_STATUS_ERROR:
> @@ -2410,7 +2410,7 @@ error:
>  static RedLinkInfo *reds_init_client_ssl_connection(RedsState *reds, int socket)
>  {
>      RedLinkInfo *link;
> -    int ssl_status;
> +    RedStreamSslStatus ssl_status;
>  
>      link = reds_init_client_connection(reds, socket);
>      if (link == NULL) {
> -- 
> 2.17.1
> 
> _______________________________________________
> 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 Virtualization]     [Linux Virtualization]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]