[Spice-devel] [PATCH 14/22] red_channel: cleanup of red_channel_client blocking methods

Frediano Ziglio fziglio at redhat.com
Wed Dec 2 08:19:57 PST 2015


From: Yonit Halperin <yhalperi at redhat.com>

(1) receive timeout as a parameter.
(2) add a return value and pass the handling
    of failures to the calling routine.
---
 server/red_channel.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/server/red_channel.c b/server/red_channel.c
index 948d354..737a6b7 100644
--- a/server/red_channel.c
+++ b/server/red_channel.c
@@ -2337,7 +2337,7 @@ int red_channel_client_wait_outgoing_item(RedChannelClient *rcc,
         spice_warning("timeout");
         return FALSE;
     } else {
-        spice_assert(red_channel_client_no_item_being_sent(rcc));
+        spice_warn_if_fail(red_channel_client_no_item_being_sent(rcc));
         return TRUE;
     }
 }
@@ -2425,4 +2425,6 @@ void red_channel_client_disconnect_if_pending_send(RedChannelClient *rcc)
     } else {
         spice_assert(red_channel_client_no_item_being_sent(rcc));
     }
+
+    spice_warn_if_fail(red_channel_client_no_item_being_sent(rcc));
 }
-- 
2.4.3



More information about the Spice-devel mailing list