[Spice-devel] [PATCH spice-server 1/6] red-channel-client: Remove push call where not necessary
Frediano Ziglio
fziglio at redhat.com
Tue Aug 29 10:53:34 UTC 2017
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 at redhat.com>
---
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 4834f79b..f88eabee 100644
--- a/server/main-channel.c
+++ b/server/main-channel.c
@@ -92,7 +92,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);
}
@@ -151,7 +151,7 @@ void main_channel_push_multi_media_time(MainChannel *main_chan, int 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 145ba43f..941c9aec 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
More information about the Spice-devel
mailing list