[PATCH 1/4] Remove not necessary inval_type from RedCacheItem

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

 



Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
---
 server/cache-item.h      | 1 -
 server/cache-item.tmpl.c | 4 ----
 server/cursor-channel.c  | 2 +-
 server/dcc-send.c        | 2 +-
 4 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/server/cache-item.h b/server/cache-item.h
index d14e9a3..864b163 100644
--- a/server/cache-item.h
+++ b/server/cache-item.h
@@ -34,7 +34,6 @@ struct RedCacheItem {
     } u;
     uint64_t id;
     size_t size;
-    uint32_t inval_type;
 };
 
 #endif /* CACHE_ITEM_H_ */
diff --git a/server/cache-item.tmpl.c b/server/cache-item.tmpl.c
index 0f22b35..2cf12d8 100644
--- a/server/cache-item.tmpl.c
+++ b/server/cache-item.tmpl.c
@@ -24,7 +24,6 @@
 #define CACHE_NAME cursor_cache
 #define CACHE_HASH_KEY CURSOR_CACHE_HASH_KEY
 #define CACHE_HASH_SIZE CURSOR_CACHE_HASH_SIZE
-#define CACHE_INVAL_TYPE SPICE_MSG_CURSOR_INVAL_ONE
 #define FUNC_NAME(name) red_cursor_cache_##name
 #define VAR_NAME(name) cursor_cache_##name
 #define CHANNEL CursorChannel
@@ -35,7 +34,6 @@
 #define CACHE_NAME palette_cache
 #define CACHE_HASH_KEY PALETTE_CACHE_HASH_KEY
 #define CACHE_HASH_SIZE PALETTE_CACHE_HASH_SIZE
-#define CACHE_INVAL_TYPE SPICE_MSG_DISPLAY_INVAL_PALETTE
 #define FUNC_NAME(name) red_palette_cache_##name
 #define VAR_NAME(name) palette_cache_##name
 #define CHANNEL DisplayChannel
@@ -110,7 +108,6 @@ static int FUNC_NAME(add)(CHANNELCLIENT *channel_client, uint64_t id, size_t siz
     ring_add(&channel_client->VAR_NAME(lru), &item->u.cache_data.lru_link);
     item->id = id;
     item->size = size;
-    item->inval_type = CACHE_INVAL_TYPE;
     return TRUE;
 }
 
@@ -134,7 +131,6 @@ static void FUNC_NAME(reset)(CHANNELCLIENT *channel_client, long size)
 #undef CACHE_NAME
 #undef CACHE_HASH_KEY
 #undef CACHE_HASH_SIZE
-#undef CACHE_INVAL_TYPE
 #undef CACHE_MAX_CLIENT_SIZE
 #undef FUNC_NAME
 #undef VAR_NAME
diff --git a/server/cursor-channel.c b/server/cursor-channel.c
index 2869b11..b4c2d3d 100644
--- a/server/cursor-channel.c
+++ b/server/cursor-channel.c
@@ -306,7 +306,7 @@ static inline void red_marshall_inval(RedChannelClient *rcc,
 {
     SpiceMsgDisplayInvalOne inval_one;
 
-    red_channel_client_init_send_data(rcc, cach_item->inval_type, NULL);
+    red_channel_client_init_send_data(rcc, SPICE_MSG_CURSOR_INVAL_ONE, NULL);
     inval_one.id = *(uint64_t *)&cach_item->id;
 
     spice_marshall_msg_cursor_inval_one(base_marshaller, &inval_one);
diff --git a/server/dcc-send.c b/server/dcc-send.c
index 2b8da3d..d766e77 100644
--- a/server/dcc-send.c
+++ b/server/dcc-send.c
@@ -1776,7 +1776,7 @@ static inline void marshall_inval_palette(RedChannelClient *rcc,
 {
     SpiceMsgDisplayInvalOne inval_one;
 
-    red_channel_client_init_send_data(rcc, cache_item->inval_type, NULL);
+    red_channel_client_init_send_data(rcc, SPICE_MSG_DISPLAY_INVAL_PALETTE, NULL);
     inval_one.id = *(uint64_t *)&cache_item->id;
 
     spice_marshall_msg_display_inval_palette(base_marshaller, &inval_one);
-- 
2.7.4

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]