diff options
| author | Alon Levy <alevy@redhat.com> | 2010-11-08 01:41:59 +0200 |
|---|---|---|
| committer | Alon Levy <alevy@redhat.com> | 2011-02-11 15:32:21 +0200 |
| commit | bb7cbceb9796fc5673656fc38ab4746e2e86647b (patch) | |
| tree | c4d7e738a8e63d7c5670132bf3a2fce4f7a8b0a2 | |
| parent | 53f5cf43ce6c498831014735406732c76cd80c5e (diff) | |
| download | spice-bb7cbceb9796fc5673656fc38ab4746e2e86647b.tar.gz spice-bb7cbceb9796fc5673656fc38ab4746e2e86647b.tar.xz spice-bb7cbceb9796fc5673656fc38ab4746e2e86647b.zip | |
server/red_worker: match channel_release_pipe_item_proc to red_channel
| -rw-r--r-- | server/red_worker.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index e692e82f..49dcad1c 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -350,7 +350,7 @@ typedef struct LocalCursor { typedef struct RedChannel RedChannel; typedef void (*channel_disconnect_proc)(RedChannel *channel); typedef void (*channel_hold_pipe_item_proc)(RedChannel *channel, PipeItem *item); -typedef void (*channel_release_pipe_item_proc)(RedChannel *channel, void *item); +typedef void (*channel_release_pipe_item_proc)(RedChannel *channel, PipeItem *item, int item_pushed); typedef int (*channel_handle_parsed_proc)(RedChannel *channel, uint32_t size, uint16_t type, void *message); struct RedChannel { @@ -1845,7 +1845,8 @@ static void red_clear_surface_drawables_from_pipe(RedWorker *worker, int surface PipeItem *tmp_item = item; item = (PipeItem *)ring_prev(ring, (RingItem *)item); ring_remove(&tmp_item->link); - worker->display_channel->common.base.release_item(&worker->display_channel->common.base, tmp_item); + worker->display_channel->common.base.release_item( + &worker->display_channel->common.base, tmp_item, FALSE); worker->display_channel->common.base.pipe_size--; if (!item) { @@ -7331,7 +7332,7 @@ static void inline channel_release_res(RedChannel *channel) if (!channel->send_data.item) { return; } - channel->release_item(channel, channel->send_data.item); + channel->release_item(channel, channel->send_data.item, FALSE); channel->send_data.item = NULL; } @@ -7345,7 +7346,7 @@ static void red_send_data(RedChannel *channel) if (!n) { channel->send_data.blocked = FALSE; if (channel->send_data.item) { - channel->release_item(channel, channel->send_data.item); + channel->release_item(channel, channel->send_data.item, FALSE); channel->send_data.item = NULL; } break; @@ -9458,12 +9459,12 @@ static void display_channel_hold_pipe_item(RedChannel *channel, PipeItem *item) } } -static void display_channel_release_item(RedChannel *channel, void *item) +static void display_channel_release_item(RedChannel *channel, PipeItem *item, int item_pushed /* ignored */) { CommonChannel *common = SPICE_CONTAINEROF(channel, CommonChannel, base); ASSERT(item); - switch (((PipeItem *)item)->type) { + switch (item->type) { case PIPE_ITEM_TYPE_DRAW: case PIPE_ITEM_TYPE_STREAM_CREATE: release_drawable(common->worker, SPICE_CONTAINEROF(item, Drawable, pipe_item)); @@ -9601,12 +9602,12 @@ static void cursor_channel_hold_pipe_item(RedChannel *channel, PipeItem *item) ((CursorItem *)item)->refs++; } -static void cursor_channel_release_item(RedChannel *channel, void *item) +static void cursor_channel_release_item(RedChannel *channel, PipeItem *item, int item_pushed) { CommonChannel *common = SPICE_CONTAINEROF(channel, CommonChannel, base); ASSERT(item); - red_release_cursor(common->worker, item); + red_release_cursor(common->worker, SPICE_CONTAINEROF(item, CursorItem, pipe_data)); } static void red_connect_cursor(RedWorker *worker, RedsStreamContext *peer, int migrate) @@ -9755,7 +9756,7 @@ static void red_wait_pipe_item_sent(RedChannel *channel, PipeItem *item) } } - channel->release_item(channel, item); + channel->release_item(channel, item, FALSE); red_unref_channel(channel); } |
