[Spice-commits] 2 commits - server/red-stream.c server/tests

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Jan 16 12:43:56 UTC 2018


 server/red-stream.c             |    4 +---
 server/tests/basic-event-loop.c |    3 +++
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 233f710ba97610b06a74040d9409b04c82836f37
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Jan 9 07:42:08 2018 +0000

    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 at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/red-stream.c b/server/red-stream.c
index 5b2c084e..44627b65 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);
 }
commit 3625f3cfd1cb1b310209205440f650f900668d50
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Jan 9 07:41:41 2018 +0000

    basic-event-loop: Document why code does not use default GLib context
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/tests/basic-event-loop.c b/server/tests/basic-event-loop.c
index 6fd8a293..b10ac946 100644
--- a/server/tests/basic-event-loop.c
+++ b/server/tests/basic-event-loop.c
@@ -130,6 +130,9 @@ SpiceCoreInterface *basic_event_loop_init(void)
 {
     ignore_sigpipe();
     spice_assert(main_context == NULL);
+    /* Qemu can use a context which is not the default one so to make
+     * sure we can handle this condition here we emulate it so don't
+     * use g_main_context_default */
     main_context = g_main_context_new();
     base_core_interface = event_loop_core;
     base_core_interface.main_context = main_context;


More information about the Spice-commits mailing list