[PATCH spice-server v2 1/6] red-channel-client: Remove push call where not necessary

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

 



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 loop instead of using the
default loop.

Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/main-channel.c       | 4 ++--
 server/red-channel-client.c | 3 +--
 2 files changed, 3 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..c45988b9 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -675,6 +675,7 @@ static void red_channel_client_push_ping(RedChannelClient *rcc)
     rcc->priv->latency_monitor.id = rand();
     red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_PING);
     red_channel_client_pipe_add_type(rcc, RED_PIPE_ITEM_TYPE_PING);
+    red_channel_client_push(rcc);
 }
 
 static void red_channel_client_ping_timer(void *opaque)
@@ -1590,7 +1591,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 +1600,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)
-- 
2.13.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]