[Spice-devel] [PATCH 1/5] move channel window setting to config_socket

Frediano Ziglio fziglio at redhat.com
Sat May 7 13:49:51 UTC 2016


Make common_graphics_channel_new_client smaller

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/red-worker.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/server/red-worker.c b/server/red-worker.c
index aa04988..72c5502 100644
--- a/server/red-worker.c
+++ b/server/red-worker.c
@@ -429,6 +429,10 @@ static int common_channel_config_socket(RedChannelClient *rcc)
             spice_warning("setsockopt failed, %s", strerror(errno));
         }
     }
+    // TODO: move wide/narrow ack setting to red_channel.
+    red_channel_client_ack_set_client_window(rcc,
+        ccc->is_low_bandwidth ?
+        WIDE_CLIENT_ACK_WINDOW : NARROW_CLIENT_ACK_WINDOW);
     return TRUE;
 }
 
@@ -449,14 +453,8 @@ CommonGraphicsChannelClient *common_graphics_channel_new_client(CommonGraphicsCh
     if (!rcc) {
         return NULL;
     }
-    CommonGraphicsChannelClient *common_cc = (CommonGraphicsChannelClient*)rcc;
     common->during_target_migrate = mig_target;
-
-    // TODO: move wide/narrow ack setting to red_channel.
-    red_channel_client_ack_set_client_window(rcc,
-        common_cc->is_low_bandwidth ?
-        WIDE_CLIENT_ACK_WINDOW : NARROW_CLIENT_ACK_WINDOW);
-    return common_cc;
+    return (CommonGraphicsChannelClient*)rcc;
 }
 
 
-- 
2.5.5



More information about the Spice-devel mailing list