[Spice-commits] server/cache-item.tmpl.c server/dcc.c server/red-channel-client.c server/red-channel-client.h

Frediano Ziglio fziglio at kemper.freedesktop.org
Mon Sep 18 16:48:39 UTC 2017


 server/cache-item.tmpl.c    |    2 +-
 server/dcc.c                |    2 +-
 server/red-channel-client.c |    9 ---------
 server/red-channel-client.h |    1 -
 4 files changed, 2 insertions(+), 12 deletions(-)

New commits:
commit b524bec574dbebcd0ea0341b711b72bfc0126d0c
Author: Frediano Ziglio <fziglio at redhat.com>
Date:   Tue Sep 12 18:04:32 2017 +0100

    channel-client: Remove red_channel_client_pipe_add_tail_push
    
    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 <fziglio at redhat.com>
    Acked-by: Christophe Fergeau <cfergeau at redhat.com>

diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index 47de423b..19e6b95f 100644
--- a/server/cache-item.tmpl.c
+++ b/server/cache-item.tmpl.c
@@ -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)
diff --git a/server/dcc.c b/server/dcc.c
index 1e0ba790..3bf75a70 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -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)
diff --git a/server/red-channel-client.c b/server/red-channel-client.c
index 8f730862..0443d618 100644
--- a/server/red-channel-client.c
+++ b/server/red-channel-client.c
@@ -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);
diff --git a/server/red-channel-client.h b/server/red-channel-client.h
index 732fbdd5..56503c44 100644
--- a/server/red-channel-client.h
+++ b/server/red-channel-client.h
@@ -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);


More information about the Spice-commits mailing list