diff options
author | Marc-André Lureau <marcandre.lureau@gmail.com> | 2014-02-27 19:38:41 +0200 |
---|---|---|
committer | Frediano Ziglio <fziglio@redhat.com> | 2015-10-15 18:30:34 +0100 |
commit | c1d518139699081f87d15cdb8c027e5e2c14ff5c (patch) | |
tree | ce644a9889a01cf1df9d9ef11df83b6ff49bb9be /server/red_channel.c | |
parent | c61404f102d2a6c5f0fb6e6f7d1c17911c91d053 (diff) | |
download | spice-c1d518139699081f87d15cdb8c027e5e2c14ff5c.tar.gz spice-c1d518139699081f87d15cdb8c027e5e2c14ff5c.tar.xz spice-c1d518139699081f87d15cdb8c027e5e2c14ff5c.zip |
server: small move to red_channel
Acked-by: Frediano Ziglio <fziglio@redhat.com>
Acked-by: Jonathon Jongsma <jjongsma@redhat.com>
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 3f40fab0..8db3d6ea 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -2429,3 +2429,12 @@ int red_channel_wait_all_sent(RedChannel *channel, return TRUE; } } + +void red_channel_client_disconnect_if_pending_send(RedChannelClient *rcc) +{ + if (red_channel_client_blocked(rcc) || rcc->pipe_size > 0) { + red_channel_client_disconnect(rcc); + } else { + spice_assert(red_channel_client_no_item_being_sent(rcc)); + } +} |