[Spice-commits] server/red_worker.c

Frediano Ziglio fziglio at kemper.freedesktop.org
Wed Nov 4 03:10:27 PST 2015

 server/red_worker.c |   14 ++++++++------
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit cf3ca136e609421f182606d8e7eaaebe139d1d24
Author: Jonathon Jongsma <jjongsma at redhat.com>
Date:   Tue Nov 3 13:37:05 2015 -0600

    Palette cache: Use correct marshal function
    In order to invalidate a single palette cache item, we were using
    spice_marshall_msg_cursor_inval_one(), which is the marshal function
    used to send an invalidation message for the Cursor channel's cache.
    This didn't cause any problems because SPICE_MSG_CURSOR_INVAL_ONE and
    SPICE_MSG_DISPLAY_INVAL_PALETTE have the same message ID and parameters,
    but it's better to use the correct marshalling function.
    Acked-by: Frediano Ziglio <fziglio at redhat.com>

diff --git a/server/red_worker.c b/server/red_worker.c
index 906b6ab..f86f017 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -7458,15 +7458,17 @@ static inline void marshall_qxl_drawable(RedChannelClient *rcc,
         red_lossy_marshall_qxl_drawable(display_channel->common.worker, rcc, m, dpi);
-static inline void red_marshall_inval(RedChannelClient *rcc,
-                                      SpiceMarshaller *base_marshaller, CacheItem *cach_item)
+static inline void red_marshall_inval_palette(RedChannelClient *rcc,
+                                              SpiceMarshaller *base_marshaller,
+                                              CacheItem *cache_item)
     SpiceMsgDisplayInvalOne inval_one;
-    red_channel_client_init_send_data(rcc, cach_item->inval_type, NULL);
-    inval_one.id = *(uint64_t *)&cach_item->id;
+    red_channel_client_init_send_data(rcc, cache_item->inval_type, NULL);
+    inval_one.id = *(uint64_t *)&cache_item->id;
+    spice_marshall_msg_display_inval_palette(base_marshaller, &inval_one);
-    spice_marshall_msg_cursor_inval_one(base_marshaller, &inval_one);
 static void display_channel_marshall_migrate_data_surfaces(DisplayChannelClient *dcc,
@@ -7923,7 +7925,7 @@ static void display_channel_send_item(RedChannelClient *rcc, PipeItem *pipe_item
-        red_marshall_inval(rcc, m, (CacheItem *)pipe_item);
+        red_marshall_inval_palette(rcc, m, (CacheItem *)pipe_item);
         StreamAgent *agent = SPICE_CONTAINEROF(pipe_item, StreamAgent, create_item);

More information about the Spice-commits mailing list