[Spice-commits] 2 commits - server/display-channel.c server/reds.c server/red-stream.c server/red-stream.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Tue Oct 9 11:54:55 UTC 2018
server/display-channel.c | 2 +-
server/red-stream.c | 2 +-
server/red-stream.h | 2 +-
server/reds.c | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit b27e0e6f0b604f0a7adb0d201adf56b96d7082fd
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Tue Oct 9 09:14:07 2018 +0100
display-channel: Remove useless parenthesis
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
diff --git a/server/display-channel.c b/server/display-channel.c
index b5e4b61d..17fa4409 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -215,7 +215,7 @@ int display_channel_get_streams_timeout(DisplayChannel *display)
if (delta < NSEC_PER_MILLISEC) {
return 0;
}
- timeout = MIN(timeout, (unsigned int)(delta / (NSEC_PER_MILLISEC)));
+ timeout = MIN(timeout, (unsigned int)(delta / NSEC_PER_MILLISEC));
}
return timeout;
}
commit 9a0d8b2db8f1a465f44fc43416df8aebbd19bd0f
Author: Frediano Ziglio <fziglio at redhat.com>
Date: Wed Sep 5 09:19:01 2018 +0100
red-stream: Propagate RedStreamSslStatus type
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 at redhat.com>
Acked-by: Christophe Fergeau <cfergeau at redhat.com>
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 4645f1c6..bdd6a45c 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) {
More information about the Spice-commits
mailing list