[Spice-devel] [PATCH] server/red_worker: cursor_channel_send_item: don't downcast
Alon Levy
alevy at redhat.com
Thu Feb 10 08:15:33 PST 2011
---
This is to be applied on top of "[PATCH v2 00/13] red_channel introducing refactoring, part 2"
---
server/red_worker.c | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/server/red_worker.c b/server/red_worker.c
index c50c851..dad168e 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8411,9 +8411,11 @@ static void display_channel_push(RedWorker *worker)
}
}
-static void cursor_channel_send_item(RedChannel *channel, PipeItem *pipe_item)
+static void cursor_channel_send_item(CursorChannel *cursor_channel, PipeItem *pipe_item)
{
- CursorChannel *cursor_channel = (CursorChannel *)red_ref_channel(channel);
+ RedChannel *channel = &cursor_channel->common.base;
+
+ red_ref_channel(channel);
red_channel_reset_send_data(channel);
switch (pipe_item->type) {
case PIPE_ITEM_TYPE_CURSOR:
@@ -8460,7 +8462,7 @@ static void cursor_channel_push(RedWorker *worker)
PipeItem *pipe_item;
while ((pipe_item = red_pipe_get((RedChannel *)worker->cursor_channel))) {
- cursor_channel_send_item((RedChannel *)worker->cursor_channel, pipe_item);
+ cursor_channel_send_item(worker->cursor_channel, pipe_item);
}
}
--
1.7.4
More information about the Spice-devel
mailing list