[Spice-devel] [PATCH 04/11] channel: rename misleading functions

Frediano Ziglio fziglio at redhat.com
Tue Feb 9 10:27:53 UTC 2016


Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
 server/cache-item.tmpl.c | 2 +-
 server/dcc.c             | 2 +-
 server/red-channel.c     | 6 +++---
 server/red-channel.h     | 2 +-
 4 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index 09add79..460e1f9 100644
--- a/server/cache-item.tmpl.c
+++ b/server/cache-item.tmpl.c
@@ -83,7 +83,7 @@ static void FUNC_NAME(remove)(CHANNELCLIENT *channel_client, CacheItem *item)
     channel_client->VAR_NAME(available) += item->size;
 
     red_channel_pipe_item_init(&channel->common.base, &item->u.pipe_data, PIPE_ITEM_TYPE_INVAL_ONE);
-    red_channel_client_pipe_add_tail(&channel_client->common.base, &item->u.pipe_data); // for now
+    red_channel_client_pipe_add_tail_push(&channel_client->common.base, &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 bf692f8..8fe7fc3 100644
--- a/server/dcc.c
+++ b/server/dcc.c
@@ -325,7 +325,7 @@ void dcc_append_drawable(DisplayChannelClient *dcc, Drawable *drawable)
     DrawablePipeItem *dpi = drawable_pipe_item_new(dcc, drawable);
 
     add_drawable_surface_images(dcc, drawable);
-    red_channel_client_pipe_add_tail(RED_CHANNEL_CLIENT(dcc), &dpi->dpi_pipe_item);
+    red_channel_client_pipe_add_tail_push(RED_CHANNEL_CLIENT(dcc), &dpi->dpi_pipe_item);
 }
 
 void dcc_add_drawable_after(DisplayChannelClient *dcc, Drawable *drawable, PipeItem *pos)
diff --git a/server/red-channel.c b/server/red-channel.c
index 4bc2faa..9cfc88f 100644
--- a/server/red-channel.c
+++ b/server/red-channel.c
@@ -1707,13 +1707,13 @@ int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc,
     return ring_item_is_linked(&item->link);
 }
 
-void red_channel_client_pipe_add_tail_no_push(RedChannelClient *rcc,
+void red_channel_client_pipe_add_tail(RedChannelClient *rcc,
                                               PipeItem *item)
 {
     client_pipe_add(rcc, item, rcc->pipe.prev);
 }
 
-void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item)
+void red_channel_client_pipe_add_tail_push(RedChannelClient *rcc, PipeItem *item)
 {
     if (client_pipe_add(rcc, item, rcc->pipe.prev)) {
         red_channel_client_push(rcc);
@@ -2284,7 +2284,7 @@ void red_channel_pipes_new_add(RedChannel *channel, new_pipe_item_t creator, voi
 void red_channel_pipes_new_add_tail(RedChannel *channel, new_pipe_item_t creator, void *data)
 {
     red_channel_pipes_create_batch(channel, creator, data,
-                                     red_channel_client_pipe_add_tail_no_push);
+                                     red_channel_client_pipe_add_tail);
 }
 
 uint32_t red_channel_max_pipe_size(RedChannel *channel)
diff --git a/server/red-channel.h b/server/red-channel.h
index 791bc5b..355fa80 100644
--- a/server/red-channel.h
+++ b/server/red-channel.h
@@ -487,7 +487,7 @@ void red_channel_client_pipe_add(RedChannelClient *rcc, PipeItem *item);
 void red_channel_client_pipe_add_after(RedChannelClient *rcc, PipeItem *item, PipeItem *pos);
 int red_channel_client_pipe_item_is_linked(RedChannelClient *rcc, PipeItem *item);
 void red_channel_client_pipe_remove_and_release(RedChannelClient *rcc, PipeItem *item);
-void red_channel_client_pipe_add_tail(RedChannelClient *rcc, PipeItem *item);
+void red_channel_client_pipe_add_tail_push(RedChannelClient *rcc, PipeItem *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);
 void red_channel_pipes_add_type(RedChannel *channel, int pipe_item_type);
-- 
2.5.0



More information about the Spice-devel mailing list