[Spice-commits] server/reds-stream.c server/reds-stream.h server/reds.c
Frediano Ziglio
fziglio at kemper.freedesktop.org
Tue Feb 28 14:21:10 UTC 2017
server/reds-stream.c | 11 +++--------
server/reds-stream.h | 1 -
server/reds.c | 3 ---
3 files changed, 3 insertions(+), 12 deletions(-)
New commits:
commit 0d76ad8b5befe238a3316fac9090217a7143dad5
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Thu Nov 24 13:31:39 2016 +0000
Remove reds_stream_set_info_flag
Encapsulate into reds_stream_set_channel.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/reds-stream.c b/server/reds-stream.c
index d0dadb9..cb88fc9 100644
--- a/server/reds-stream.c
+++ b/server/reds-stream.c
@@ -380,6 +380,9 @@ void reds_stream_set_channel(RedsStream *stream, int connection_id,
stream->priv->info->connection_id = connection_id;
stream->priv->info->type = channel_type;
stream->priv->info->id = channel_id;
+ if (reds_stream_is_ssl(stream)) {
+ stream->priv->info->flags |= SPICE_CHANNEL_EVENT_FLAG_TLS;
+ }
}
RedsStream *reds_stream_new(RedsState *reds, int socket)
@@ -404,14 +407,6 @@ bool reds_stream_is_ssl(RedsStream *stream)
return (stream->priv->ssl != NULL);
}
-void reds_stream_set_info_flag(RedsStream *stream, unsigned int flag)
-{
- g_return_if_fail((flag == SPICE_CHANNEL_EVENT_FLAG_TLS)
- || (flag == SPICE_CHANNEL_EVENT_FLAG_ADDR_EXT));
-
- stream->priv->info->flags |= flag;
-}
-
void reds_stream_disable_writev(RedsStream *stream)
{
stream->priv->writev = NULL;
diff --git a/server/reds-stream.h b/server/reds-stream.h
index a8d1736..3a4aa25 100644
--- a/server/reds-stream.h
+++ b/server/reds-stream.h
@@ -71,7 +71,6 @@ RedsStream *reds_stream_new(RedsState *reds, int socket);
bool reds_stream_is_ssl(RedsStream *stream);
RedsStreamSslStatus reds_stream_ssl_accept(RedsStream *stream);
int reds_stream_enable_ssl(RedsStream *stream, SSL_CTX *ctx);
-void reds_stream_set_info_flag(RedsStream *stream, unsigned int flag);
int reds_stream_get_family(const RedsStream *stream);
int reds_stream_is_plain_unix(const RedsStream *stream);
int reds_stream_send_msgfd(RedsStream *stream, int fd);
diff --git a/server/reds.c b/server/reds.c
index 39a7a31..966a271 100644
--- a/server/reds.c
+++ b/server/reds.c
@@ -1580,9 +1580,6 @@ static void reds_info_new_channel(RedLinkInfo *link, int connection_id)
link->link_mess->channel_id,
reds_stream_is_ssl(link->stream) ? "Secure" : "Non Secure");
/* add info + send event */
- if (reds_stream_is_ssl(link->stream)) {
- reds_stream_set_info_flag(link->stream, SPICE_CHANNEL_EVENT_FLAG_TLS);
- }
reds_stream_set_channel(link->stream, connection_id,
link->link_mess->channel_type,
link->link_mess->channel_id);
More information about the Spice-commits
mailing list