summaryrefslogtreecommitdiffstats
path: root/server/main_channel.c
diff options
context:
space:
mode:
authorAlon Levy <alevy@redhat.com>2011-08-23 14:00:11 +0300
committerAlon Levy <alevy@redhat.com>2011-08-23 18:29:45 +0300
commitf15cac7d7d757fed2a8ce36e8800616e905b128c (patch)
treefd34cf5e434926631c8b5e9310fa240eaf13a73a /server/main_channel.c
parent0410cccde378cb418281560d47940a3e7100a3c4 (diff)
downloadspice-f15cac7d7d757fed2a8ce36e8800616e905b128c.tar.gz
spice-f15cac7d7d757fed2a8ce36e8800616e905b128c.tar.xz
spice-f15cac7d7d757fed2a8ce36e8800616e905b128c.zip
server/reds: fix reds_main_channel_connected
instead of checking just for reds->main_channel check that there is at least one client as well.
Diffstat (limited to 'server/main_channel.c')
-rw-r--r--server/main_channel.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/server/main_channel.c b/server/main_channel.c
index e793e489..43c0f3f2 100644
--- a/server/main_channel.c
+++ b/server/main_channel.c
@@ -155,6 +155,11 @@ enum NetTestStage {
NET_TEST_STAGE_RATE,
};
+int main_channel_is_connected(MainChannel *main_chan)
+{
+ return red_channel_is_connected(&main_chan->base);
+}
+
// when disconnection occurs, let reds shutdown all channels. This will trigger the
// real disconnection of main channel
static void main_channel_client_on_disconnect(RedChannelClient *rcc)