From 40c658f5183fa85305213c5efb664faafed24459 Mon Sep 17 00:00:00 2001 From: Frediano Ziglio Date: Tue, 29 Aug 2017 09:03:33 +0100 Subject: [PATCH] red-channel-client: Remove push call where not necessary Now the push is done automatically when a PipeItem is added (cfr commit 5c460de1a3972b7cf2b9b2944d0b500c3affc363 "worker: push data when clients can receive them"), forcing a push cause only network fragmentation and is required only if you are handling data in a polling loop (and thus, you are preventing the default event loop from running). Signed-off-by: Frediano Ziglio Acked-by: Christophe Fergeau --- server/main-channel.c | 4 ++-- server/red-channel-client.c | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/server/main-channel.c b/server/main-channel.c index c30374c3..e72e5d79 100644 --- a/server/main-channel.c +++ b/server/main-channel.c @@ -81,7 +81,7 @@ void main_channel_push_mouse_mode(MainChannel *main_chan, SpiceMouseMode current .is_client_mouse_allowed=is_client_mouse_allowed, }; - red_channel_pipes_new_add_push(RED_CHANNEL(main_chan), + red_channel_pipes_new_add(RED_CHANNEL(main_chan), main_mouse_mode_item_new, &info); } @@ -140,7 +140,7 @@ void main_channel_push_multi_media_time(MainChannel *main_chan, uint32_t time) .time = time, }; - red_channel_pipes_new_add_push(RED_CHANNEL(main_chan), + red_channel_pipes_new_add(RED_CHANNEL(main_chan), main_multi_media_time_item_new, &info); } diff --git a/server/red-channel-client.c b/server/red-channel-client.c index 2612a6db..d145c736 100644 --- a/server/red-channel-client.c +++ b/server/red-channel-client.c @@ -1590,7 +1590,6 @@ void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type) red_pipe_item_init(item, pipe_item_type); red_channel_client_pipe_add(rcc, item); - red_channel_client_push(rcc); } void red_channel_client_pipe_add_empty_msg(RedChannelClient *rcc, int msg_type) @@ -1600,7 +1599,6 @@ void red_channel_client_pipe_add_empty_msg(RedChannelClient *rcc, int msg_type) red_pipe_item_init(&item->base, RED_PIPE_ITEM_TYPE_EMPTY_MSG); item->msg = msg_type; red_channel_client_pipe_add(rcc, &item->base); - red_channel_client_push(rcc); } gboolean red_channel_client_pipe_is_empty(RedChannelClient *rcc)