diff options
author | Yonit Halperin <yhalperi@redhat.com> | 2011-10-18 15:09:05 +0200 |
---|---|---|
committer | Yonit Halperin <yhalperi@redhat.com> | 2011-10-18 15:16:46 +0200 |
commit | 86576aec6ab83712e26221beb743565ecad27721 (patch) | |
tree | 8cc24a88c72dda236577d8067453185bfe2bbd83 | |
parent | bc9306852d145916a199176cf54967b590897ac0 (diff) |
server/red_worker: fix placing of ASSERT(red_channel_client_no_item_being_sent) (fdbz #41523)
Call ASSERT(red_channel_client_no_item_being_sent) only if
red_wait_outgoing_item/s did not timeout.
-rw-r--r-- | server/red_worker.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/server/red_worker.c b/server/red_worker.c index 7af715dc..6756af97 100644 --- a/server/red_worker.c +++ b/server/red_worker.c @@ -2005,9 +2005,6 @@ static void red_clear_surface_drawables_from_pipes(RedWorker *worker, int surfac // in case that the pipe didn't contain any item that is dependent on the surface, but // there is one during sending. red_wait_outgoing_item(&dcc->common.base); - if (dcc) { - ASSERT(red_channel_client_no_item_being_sent(&dcc->common.base)); - } } } } @@ -10001,6 +9998,8 @@ static void red_wait_outgoing_item(RedChannelClient *rcc) // TODO - shutting down the socket but we still need to trigger // disconnection. Right now we wait for main channel to error for that. red_channel_client_shutdown(rcc); + } else { + ASSERT(red_channel_client_no_item_being_sent(rcc)); } } @@ -10008,6 +10007,8 @@ static void rcc_shutdown_if_blocked(RedChannelClient *rcc) { if (red_channel_client_blocked(rcc)) { red_channel_client_shutdown(rcc); + } else { + ASSERT(red_channel_client_no_item_being_sent(rcc)); } } @@ -10032,6 +10033,8 @@ static void red_wait_outgoing_items(RedChannel *channel) if (blocked) { red_printf("timeout"); red_channel_apply_clients(channel, rcc_shutdown_if_blocked); + } else { + ASSERT(red_channel_no_item_being_sent(channel)); } } @@ -10234,7 +10237,6 @@ static inline void red_cursor_reset(RedWorker *worker) red_pipes_add_verb(&worker->cursor_channel->common.base, SPICE_MSG_CURSOR_RESET); } red_wait_outgoing_items(&worker->cursor_channel->common.base); - ASSERT(red_channel_no_item_being_sent(&worker->cursor_channel->common.base)); } } |