diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-03-14 19:34:35 +0100 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2012-03-25 19:00:00 +0200 |
commit | b34fd7432d61b992446a3cd9c6f8eb7747ba0a76 (patch) | |
tree | 60a5b34a3e37177ea6a54da9fd8d2b475bfe9257 /server/red_client_shared_cache.h | |
parent | 359fc1cb5dbbcf32132c3e8ee6f881a23deff684 (diff) | |
download | spice-b34fd7432d61b992446a3cd9c6f8eb7747ba0a76.tar.gz spice-b34fd7432d61b992446a3cd9c6f8eb7747ba0a76.tar.xz spice-b34fd7432d61b992446a3cd9c6f8eb7747ba0a76.zip |
Use the spice-common logging functions
It will abort by default for critical level messages. That behaviour
can be tuned at runtime.
Diffstat (limited to 'server/red_client_shared_cache.h')
-rw-r--r-- | server/red_client_shared_cache.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/server/red_client_shared_cache.h b/server/red_client_shared_cache.h index fb405c36..821ee189 100644 --- a/server/red_client_shared_cache.h +++ b/server/red_client_shared_cache.h @@ -49,7 +49,7 @@ static int FUNC_NAME(hit)(CACHE *cache, uint64_t id, int *lossy, DisplayChannelC if (item->id == id) { ring_remove(&item->lru_link); ring_add(&cache->lru, &item->lru_link); - ASSERT(dcc->common.id < MAX_CACHE_CLIENTS) + spice_assert(dcc->common.id < MAX_CACHE_CLIENTS); item->sync[dcc->common.id] = serial; cache->sync[dcc->common.id] = serial; *lossy = item->lossy; @@ -86,7 +86,7 @@ static int FUNC_NAME(add)(CACHE *cache, uint64_t id, uint32_t size, int lossy, D uint64_t serial; int key; - ASSERT(size > 0); + spice_assert(size > 0); item = spice_new(NewCacheItem, 1); serial = red_channel_client_get_message_serial(&dcc->common.base); @@ -119,7 +119,7 @@ static int FUNC_NAME(add)(CACHE *cache, uint64_t id, uint32_t size, int lossy, D now = &cache->hash_table[CACHE_HASH_KEY(tail->id)]; for (;;) { - ASSERT(*now); + spice_assert(*now); if (*now == tail) { *now = tail->next; break; @@ -217,7 +217,7 @@ static int FUNC_NAME(freeze)(CACHE *cache) static void FUNC_NAME(destroy)(CACHE *cache) { - ASSERT(cache); + spice_assert(cache); pthread_mutex_lock(&cache->lock); PRIVATE_FUNC_NAME(clear)(cache); |