[PATCH 01/22] display: replace some dubious asserts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>

Signed-off-by: Marc-André Lureau <marcandre.lureau@xxxxxxxxx>
Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
Acked-by: Jonathon Jongsma <jjongsma@xxxxxxxxxx>
uri ???
---
 server/display-channel.c | 7 +++++--
 server/red_worker.c      | 4 +---
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/server/display-channel.c b/server/display-channel.c
index a37e651..cecbd44 100644
--- a/server/display-channel.c
+++ b/server/display-channel.c
@@ -944,11 +944,14 @@ int display_channel_wait_for_migrate_data(DisplayChannel *display)
     RedChannel *channel = &display->common.base;
     RedChannelClient *rcc;
 
+    if (!red_channel_waits_for_migrate_data(&display->common.base)) {
+        return FALSE;
+    }
+
     spice_debug(NULL);
-    spice_assert(channel->clients_num == 1);
+    spice_warn_if_fail(channel->clients_num == 1);
 
     rcc = SPICE_CONTAINEROF(ring_get_head(&channel->clients), RedChannelClient, channel_link);
-    spice_assert(red_channel_client_waits_for_migrate_data(rcc));
 
     for (;;) {
         red_channel_client_receive(rcc);
diff --git a/server/red_worker.c b/server/red_worker.c
index ffd1508..f14aaff 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -1219,9 +1219,7 @@ static void handle_dev_start(void *opaque, void *payload)
     }
     if (worker->display_channel) {
         worker->display_channel->common.during_target_migrate = FALSE;
-        if (red_channel_waits_for_migrate_data(&worker->display_channel->common.base)) {
-            display_channel_wait_for_migrate_data(worker->display_channel);
-        }
+        display_channel_wait_for_migrate_data(worker->display_channel);
     }
     worker->running = TRUE;
     guest_set_client_capabilities(worker);
-- 
2.4.3

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]