diff options
author | Alon Levy <alevy@redhat.com> | 2010-11-12 10:42:25 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2011-03-02 17:27:53 +0200 |
commit | 7890b623b55cba6e0b3e99322d377633d94127d6 (patch) | |
tree | 4541c4cf8372a3fc5622984a4517849a41b9f707 /server/red_channel.c | |
parent | aa5d23fdecaec827ab0f7fc736e31ef1ffd6502e (diff) | |
download | spice-7890b623b55cba6e0b3e99322d377633d94127d6.tar.gz spice-7890b623b55cba6e0b3e99322d377633d94127d6.tar.xz spice-7890b623b55cba6e0b3e99322d377633d94127d6.zip |
server/red_channel: add red_channel_disconnect, use in red_worker
replace channel_release_res in red_worker with red_channel_disconnect.
Diffstat (limited to 'server/red_channel.c')
-rw-r--r-- | server/red_channel.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c index 4330236a..18c7f355 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -751,3 +751,12 @@ int red_channel_no_item_being_sent(RedChannel *channel) { return channel->send_data.item == NULL; } + +void red_channel_disconnect(RedChannel *channel) +{ + red_channel_pipe_clear(channel); + reds_stream_free(channel->stream); + channel->stream = NULL; + channel->send_data.blocked = FALSE; + channel->send_data.size = 0; +} |