[Spice-devel] [PATCH spice-server] red-channel: Remove red_channel_init_outgoing_messages_window

Frediano Ziglio fziglio at redhat.com
Fri Oct 6 10:58:32 UTC 2017


This function does not make much sense anymore.
Is called by RedVmcChannel which doesn't use RedChannelClient ACKs
so the variable changed are not used.
Also is called when the channel is constructed to set client
fields however at that stage there are no clients.

Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
Note that now red_channel_client_init_outgoing_messages_window
is not used anymore.
On the other hand this function is really similar to
red_channel_client_ack_zero_messages_window but IMHO has a better
name. Would prefer a follow up to unify
red_channel_client_init_outgoing_messages_window and
red_channel_client_ack_zero_messages_window names and behaviour.
---
 server/red-channel.c | 8 --------
 server/red-channel.h | 3 ---
 server/spicevmc.c    | 2 --
 3 files changed, 13 deletions(-)

diff --git a/server/red-channel.c b/server/red-channel.c
index dfcf4e6f6..093966e38 100644
--- a/server/red-channel.c
+++ b/server/red-channel.c
@@ -421,14 +421,6 @@ void red_channel_push(RedChannel *channel)
     g_list_foreach(channel->priv->clients, (GFunc)red_channel_client_push, NULL);
 }
 
-// TODO: this function doesn't make sense because the window should be client (WAN/LAN)
-// specific
-void red_channel_init_outgoing_messages_window(RedChannel *channel)
-{
-    g_list_foreach(channel->priv->clients,
-                   (GFunc)red_channel_client_init_outgoing_messages_window, NULL);
-}
-
 void red_channel_pipes_add(RedChannel *channel, RedPipeItem *item)
 {
     RedChannelClient *rcc;
diff --git a/server/red-channel.h b/server/red-channel.h
index 8584bb0e8..f256aa404 100644
--- a/server/red-channel.h
+++ b/server/red-channel.h
@@ -157,9 +157,6 @@ void red_channel_destroy(RedChannel *channel);
 /* return true if all the channel clients support the cap */
 bool red_channel_test_remote_cap(RedChannel *channel, uint32_t cap);
 
-/* should be called when a new channel is ready to send messages */
-void red_channel_init_outgoing_messages_window(RedChannel *channel);
-
 // helper to push a new item to all channels
 typedef RedPipeItem *(*new_pipe_item_t)(RedChannelClient *rcc, void *data, int num);
 int red_channel_pipes_new_add(RedChannel *channel, new_pipe_item_t creator, void *data);
diff --git a/server/spicevmc.c b/server/spicevmc.c
index 6b9b96fc8..a1685483d 100644
--- a/server/spicevmc.c
+++ b/server/spicevmc.c
@@ -246,8 +246,6 @@ red_vmc_channel_constructed(GObject *object)
     red_channel_set_cap(RED_CHANNEL(self), SPICE_SPICEVMC_CAP_DATA_COMPRESS_LZ4);
 #endif
 
-    red_channel_init_outgoing_messages_window(RED_CHANNEL(self));
-
     reds_register_channel(reds, RED_CHANNEL(self));
 }
 
-- 
2.13.6



More information about the Spice-devel mailing list