channel-client: Remove red_channel_client_pipe_add_tail_push

Now the push is done automatically when a PipeItem is added
(cfr commit 5c460de1a3
"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 <fziglio@redhat.com>
Acked-by: Christophe Fergeau <cfergeau@redhat.com>
This commit is contained in:
Frediano Ziglio 2017-09-12 18:04:32 +01:00
parent f49f04f2be
commit b524bec574
4 changed files with 2 additions and 12 deletions

View File

@ -78,7 +78,7 @@ static void FUNC_NAME(remove)(CHANNELCLIENT *channel_client, RedCacheItem *item)
channel_client->priv->VAR_NAME(available) += item->u.cache_data.size;
red_pipe_item_init(&item->u.pipe_data, RED_PIPE_ITEM_TYPE_INVAL_ONE);
red_channel_client_pipe_add_tail_and_push(RED_CHANNEL_CLIENT(channel_client), &item->u.pipe_data); // for now
red_channel_client_pipe_add_tail(RED_CHANNEL_CLIENT(channel_client), &item->u.pipe_data); // for now
}
static int FUNC_NAME(add)(CHANNELCLIENT *channel_client, uint64_t id, size_t size)

View File

@ -470,7 +470,7 @@ void dcc_append_drawable(DisplayChannelClient *dcc, Drawable *drawable)
RedDrawablePipeItem *dpi = red_drawable_pipe_item_new(dcc, drawable);
add_drawable_surface_images(dcc, drawable);
red_channel_client_pipe_add_tail_and_push(RED_CHANNEL_CLIENT(dcc), &dpi->dpi_pipe_item);
red_channel_client_pipe_add_tail(RED_CHANNEL_CLIENT(dcc), &dpi->dpi_pipe_item);
}
void dcc_add_drawable_after(DisplayChannelClient *dcc, Drawable *drawable, RedPipeItem *pos)

View File

@ -1596,15 +1596,6 @@ void red_channel_client_pipe_add_tail(RedChannelClient *rcc,
g_queue_push_tail(&rcc->priv->pipe, item);
}
void red_channel_client_pipe_add_tail_and_push(RedChannelClient *rcc, RedPipeItem *item)
{
if (!prepare_pipe_add(rcc, item)) {
return;
}
g_queue_push_tail(&rcc->priv->pipe, item);
red_channel_client_push(rcc);
}
void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type)
{
RedPipeItem *item = spice_new(RedPipeItem, 1);

View File

@ -96,7 +96,6 @@ int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc, RedPipeItem *i
void red_channel_client_pipe_remove_and_release(RedChannelClient *rcc, RedPipeItem *item);
void red_channel_client_pipe_remove_and_release_pos(RedChannelClient *rcc, GList *item_pos);
void red_channel_client_pipe_add_tail(RedChannelClient *rcc, RedPipeItem *item);
void red_channel_client_pipe_add_tail_and_push(RedChannelClient *rcc, RedPipeItem *item);
/* for types that use this routine -> the pipe item should be freed */
void red_channel_client_pipe_add_type(RedChannelClient *rcc, int pipe_item_type);
RedPipeItem *red_channel_client_new_empty_msg(int msg_type);