[Spice-devel] [PATCH spice-server] main-channel-client: Do not call red_channel_client_begin_send_message if we are not sending a message

Frediano Ziglio fziglio at redhat.com
Tue Dec 19 11:38:26 UTC 2017


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>
---
 server/main-channel-client.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/server/main-channel-client.c b/server/main-channel-client.c
index 07435073e..ebdef3f43 100644
--- a/server/main-channel-client.c
+++ b/server/main-channel-client.c
@@ -1052,8 +1052,9 @@ void main_channel_client_send_item(RedChannelClient *rcc, RedPipeItem *base)
             if (mcc->priv->initial_channels_list_sent) {
                 main_channel_marshall_registered_channel(rcc, m,
                     SPICE_UPCAST(RedRegisteredChannelPipeItem, base));
+                break;
             }
-            break;
+            return;
         default:
             break;
     };
-- 
2.14.3



More information about the Spice-devel mailing list