[Spice-commits] server/main-channel-client.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Tue Dec 19 17:07:06 UTC 2017


 server/main-channel-client.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 521353639b9815c9ff9aacd8ddad377e9a72cc27
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Wed Dec 6 16:46:13 2017 +0000

    main-channel-client: Do not call red_channel_client_begin_send_message if we are not sending a message
    
    In case mcc->priv->initial_channels_list_sent is false we didn't
    marshall any message so we should not call
    red_channel_client_begin_send_message.
    
    Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index 07435073..7c0977cc 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -1049,10 +1049,11 @@ void main_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *base)
              * message from the client before sending any CHANNEL_LIST message. If
              * we've already sent our initial CHANNELS_LIST message, then it should be
              * safe to send new ones for newly-registered channels. */
-            if (mcc->priv->initial_channels_list_sent) {
-                main_channel_marshall_registered_channel(rcc, m,
-                    SPICE_UPCAST(RedRegisteredChannelPipeItem, base));
+            if (!mcc->priv->initial_channels_list_sent) {
+                return;
             }
+            main_channel_marshall_registered_channel(rcc, m,
+                SPICE_UPCAST(RedRegisteredChannelPipeItem, base));
             break;
         default:
             break;


More information about the Spice-commits mailing list