summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-02-10 18:13:49 +0200
committerAlon Levy <alevy@redhat.com>2011-02-11 15:32:21 +0200
commit0b687d9b23e375b13738a217e889e2f6b1c676f4 (patch)
tree1f35483046f0bc62c95d5feda4969237e1e1e7e1 /server
parentbb7cbceb9796fc5673656fc38ab4746e2e86647b (diff)
downloadspice-0b687d9b23e375b13738a217e889e2f6b1c676f4.tar.gz
spice-0b687d9b23e375b13738a217e889e2f6b1c676f4.tar.xz
spice-0b687d9b23e375b13738a217e889e2f6b1c676f4.zip
server/red_worker: cursor_channel_send_item: don't downcast
Diffstat (limited to 'server')
-rw-r--r--server/red_worker.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/server/red_worker.c b/server/red_worker.c
index 49dcad1c..d75856eb 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);
}
}