diff options
author | Alon Levy <alevy@redhat.com> | 2010-11-07 12:23:59 +0200 |
---|---|---|
committer | Alon Levy <alevy@redhat.com> | 2010-11-07 12:35:18 +0200 |
commit | 46dc081b555bab025519215a7e80ef0ecadbea7b (patch) | |
tree | 5396e798820ae7e670f464785b78e9391d8d29b3 | |
parent | 4374d9e7dec828d54fb4448add61ec22698a73fc (diff) | |
download | spice-46dc081b555bab025519215a7e80ef0ecadbea7b.tar.gz spice-46dc081b555bab025519215a7e80ef0ecadbea7b.tar.xz spice-46dc081b555bab025519215a7e80ef0ecadbea7b.zip |
server/red_channel: add red_channel_is_connected
-rw-r--r-- | server/red_channel.c | 5 | ||||
-rw-r--r-- | server/red_channel.h | 2 |
2 files changed, 7 insertions, 0 deletions
diff --git a/server/red_channel.c b/server/red_channel.c index 3795962d..0b4e6f18 100644 --- a/server/red_channel.c +++ b/server/red_channel.c @@ -555,6 +555,11 @@ static PipeItem *red_channel_pipe_get(RedChannel *channel) return item; } +int red_channel_is_connected(RedChannel *channel) +{ + return !!channel->peer; +} + static void red_channel_pipe_clear(RedChannel *channel) { PipeItem *item; diff --git a/server/red_channel.h b/server/red_channel.h index 3e2ae48f..16b3f2dd 100644 --- a/server/red_channel.h +++ b/server/red_channel.h @@ -190,6 +190,8 @@ RedChannel *red_channel_create_parser(int size, RedsStreamContext *peer, channel_on_incoming_error_proc incoming_error, channel_on_outgoing_error_proc outgoing_error); +int red_channel_is_connected(RedChannel *channel); + void red_channel_destroy(RedChannel *channel); void red_channel_shutdown(RedChannel *channel); |