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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Make common_graphics_channel_new_client smaller

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 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

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]