server: use red_channel_get_message_serial

This commit is contained in:
Alon Levy 2010-11-09 11:37:35 +02:00
parent 17b6a58f1e
commit 766bb420bb
2 changed files with 4 additions and 9 deletions

View File

@ -40,7 +40,7 @@ static int FUNC_NAME(hit)(CACHE *cache, uint64_t id, int *lossy, CHANNEL *channe
NewCacheItem *item;
uint64_t serial;
serial = channel_message_serial((RedChannel *)channel);
serial = red_channel_get_message_serial((RedChannel *)channel);
pthread_mutex_lock(&cache->lock);
item = cache->hash_table[CACHE_HASH_KEY(id)];
@ -88,7 +88,7 @@ static int FUNC_NAME(add)(CACHE *cache, uint64_t id, uint32_t size, int lossy, C
ASSERT(size > 0);
item = spice_new(NewCacheItem, 1);
serial = channel_message_serial((RedChannel *)channel);
serial = red_channel_get_message_serial((RedChannel *)channel);
pthread_mutex_lock(&cache->lock);
@ -172,7 +172,7 @@ static void FUNC_NAME(reset)(CACHE *cache, CHANNEL *channel, SpiceMsgWaitForChan
uint64_t serial;
uint32_t i;
serial = channel_message_serial((RedChannel *)channel);
serial = red_channel_get_message_serial((RedChannel *)channel);
pthread_mutex_lock(&cache->lock);
PRIVATE_FUNC_NAME(clear)(cache);

View File

@ -1259,11 +1259,6 @@ static inline void red_pipe_add_image_item_after(RedWorker *worker, ImageItem *i
red_channel_pipe_add_after(&worker->display_channel->common.base, &item->link, pos);
}
static inline uint64_t channel_message_serial(RedChannel *channel)
{
return channel->send_data.header->serial;
}
static void release_image_item(ImageItem *item)
{
if (!--item->refs) {
@ -7626,7 +7621,7 @@ static void display_channel_send_migrate_data(DisplayChannel *display_channel)
ASSERT(MAX_CACHE_CLIENTS == 4); //MIGRATE_DATA_VERSION dependent
display_data.version = DISPLAY_MIGRATE_DATA_VERSION;
display_data.message_serial = channel_message_serial((RedChannel *)display_channel);
display_data.message_serial = red_channel_get_message_serial((RedChannel *)display_channel);
display_data.pixmap_cache_freezer = pixmap_cache_freeze(display_channel->pixmap_cache);
display_data.pixmap_cache_id = display_channel->pixmap_cache->id;