mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-10 03:47:35 +00:00
red-stream: Reuse red_stream_disable_writev function
The same function is used to reset writev field in SASL code. Signed-off-by: Frediano Ziglio <fziglio@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
3625f3cfd1
commit
233f710ba9
@ -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);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user