[Spice-devel] [PATCH 1/8] Revert if to make code more readable
Frediano Ziglio
fziglio at redhat.com
Mon Sep 19 08:29:56 UTC 2016
Keep all code to send SPICE_MSG_LIST together.
Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
---
server/dcc-send.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/server/dcc-send.c b/server/dcc-send.c
index 1d32276..2215f69 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -283,14 +283,15 @@ static void send_free_list(RedChannelClient *rcc)
dcc_pixmap_cache_hit(dcc, dcc->priv->send_data.pixmap_cache_items[i], &dummy);
}
- if (free_list->wait.header.wait_count) {
- red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL);
- } else { /* only one message, no need for a list */
+ /* only one message, no need for a list */
+ if (!free_list->wait.header.wait_count) {
red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_INVAL_LIST, NULL);
spice_marshall_msg_display_inval_list(urgent_marshaller, free_list->res);
return;
}
+ red_channel_client_init_send_data(rcc, SPICE_MSG_LIST, NULL);
+
inval_m = spice_marshaller_get_submarshaller(urgent_marshaller);
marshal_sub_msg_inval_list(inval_m, free_list);
--
2.7.4
More information about the Spice-devel
mailing list