[Spice-devel] [spice-server] Slight simplification of red_channel_client_push() logic

Christophe Fergeau cfergeau at redhat.com
Mon Apr 16 15:09:02 UTC 2018


Signed-off-by: Christophe Fergeau <cfergeau at redhat.com>
---
 server/red-channel-client.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index f154c5c63..d46c299c2 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -1303,11 +1303,11 @@ void red_channel_client_push(RedChannelClient *rcc)
 {
     RedPipeItem *pipe_item;
 
-    if (!rcc->priv->during_send) {
-        rcc->priv->during_send = TRUE;
-    } else {
+    if (rcc->priv->during_send) {
         return;
     }
+
+    rcc->priv->during_send = TRUE;
     g_object_ref(rcc);
     if (red_channel_client_is_blocked(rcc)) {
         red_channel_client_send(rcc);
-- 
2.14.3



More information about the Spice-devel mailing list