[Spice-devel] [PATCH 04/23] server/red_worker: add red_channel_push
Marc-André Lureau
marcandre.lureau at gmail.com
Sat Feb 12 12:01:15 PST 2011
ack, but
On Fri, Feb 11, 2011 at 6:22 PM, Alon Levy <alevy at redhat.com> wrote:
> -static void display_channel_push(RedWorker *worker)
> +void red_channel_push(RedChannel *channel)
> {
> PipeItem *pipe_item;
>
> - while ((pipe_item = red_channel_pipe_get((RedChannel *)worker->display_channel))) {
> - display_channel_send_item((RedChannel *)worker->display_channel, pipe_item);
> + if (!channel->during_send) {
> + channel->during_send = TRUE;
> + } else {
> + return;
> }
> +
> + if (channel->send_data.blocked) {
> + red_channel_send(channel);
> + }
> +
> + while ((pipe_item = red_channel_pipe_get(channel))) {
> + channel->send_item(channel, pipe_item);
> + }
> + channel->during_send = FALSE;
> }
Why adding red_channel_send() here? It shouldn't hurt, though.. but is
there a reason?
--
Marc-André Lureau
More information about the Spice-devel
mailing list