[Spice-devel] [PATCH v2 36/40] server/red_worker: use red_channel_is_connected

Alon Levy alevy at redhat.com
Wed Mar 2 00:31:59 PST 2011


---
 server/red_worker.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 14e8fef..446c72e 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -8269,7 +8269,7 @@ static void red_disconnect_display(RedChannel *channel)
     CommonChannel *common = SPICE_CONTAINEROF(channel, CommonChannel, base);
     RedWorker *worker;
 
-    if (!channel || !channel->stream) {
+    if (!channel || !red_channel_is_connected(channel)) {
         return;
     }
     worker = common->worker;
@@ -8601,7 +8601,7 @@ static int display_channel_wait_for_init(DisplayChannel *display_channel)
     uint64_t end_time = red_now() + DISPLAY_CLIENT_TIMEOUT;
     for (;;) {
         red_channel_receive((RedChannel *)display_channel);
-        if (!display_channel->common.base.stream) {
+        if (!red_channel_is_connected(&display_channel->common.base)) {
             break;
         }
         if (display_channel->pixmap_cache && display_channel->glz_dict) {
@@ -9227,7 +9227,7 @@ static void red_disconnect_cursor(RedChannel *channel)
 {
     CommonChannel *common;
 
-    if (!channel || !channel->stream) {
+    if (!channel || !red_channel_is_connected(channel)) {
         return;
     }
     common = SPICE_CONTAINEROF(channel, CommonChannel, base);
-- 
1.7.4.1



More information about the Spice-devel mailing list