[Spice-devel] [PATCH spice-server] red-stream: Reuse red_stream_disable_writev function

Christophe Fergeau cfergeau at redhat.com
Tue Jan 16 12:38:27 UTC 2018


Acked-by: Christophe Fergeau <cfergeau at redhat.com>

On Tue, Jan 09, 2018 at 07:43:25PM +0000, Frediano Ziglio wrote:
> The same function is used to reset writev field in SASL code.
> 
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
>  server/red-stream.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/server/red-stream.c b/server/red-stream.c
> index 5b2c084e9..44627b65f 100644
> --- a/server/red-stream.c
> +++ b/server/red-stream.c
> @@ -427,12 +427,10 @@ bool red_stream_is_ssl(RedStream *stream)
>      return (stream->priv->ssl != NULL);
>  }
>  
> -#if HAVE_SASL
>  static void red_stream_disable_writev(RedStream *stream)
>  {
>      stream->priv->writev = NULL;
>  }
> -#endif
>  
>  RedStreamSslStatus red_stream_ssl_accept(RedStream *stream)
>  {
> @@ -483,7 +481,7 @@ int red_stream_enable_ssl(RedStream *stream, SSL_CTX *ctx)
>  
>      stream->priv->write = stream_ssl_write_cb;
>      stream->priv->read = stream_ssl_read_cb;
> -    stream->priv->writev = NULL;
> +    red_stream_disable_writev(stream);
>  
>      return red_stream_ssl_accept(stream);
>  }
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/spice-devel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/spice-devel/attachments/20180116/3e9234e0/attachment-0001.sig>


More information about the Spice-devel mailing list