mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2025-12-26 22:48:19 +00:00
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@redhat.com> Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
parent
f84b26f801
commit
9a0d8b2db8
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user