size_t should be represented as %z and not %ld sicne its different on 32bit and 64bot platforms!!!!!!

This commit is contained in:
Michal Bielicki - cypromis 2011-10-10 11:10:28 +02:00
parent 0a0ee5fed1
commit 5d092f50c9

View File

@ -465,7 +465,7 @@ static char *url_cache_get(url_cache_t *cache, switch_core_session_t *session, c
/* URL is not cached, let's add it.*/ /* URL is not cached, let's add it.*/
/* Set up URL entry and add to map to prevent simultaneous downloads */ /* Set up URL entry and add to map to prevent simultaneous downloads */
cache->misses++; cache->misses++;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Cache MISS: size = %ld (%ld MB), hit ratio = %d/%d\n", cache->queue.size, cache->size / 1000000, cache->hits, cache->hits + cache->misses); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_INFO, "Cache MISS: size = %z (%z MB), hit ratio = %d/%d\n", cache->queue.size, cache->size / 1000000, cache->hits, cache->hits + cache->misses);
u = cached_url_create(cache, url); u = cached_url_create(cache, url);
if (url_cache_add(cache, session, u) != SWITCH_STATUS_SUCCESS) { if (url_cache_add(cache, session, u) != SWITCH_STATUS_SUCCESS) {
/* This error should never happen */ /* This error should never happen */
@ -510,7 +510,7 @@ static char *url_cache_get(url_cache_t *cache, switch_core_session_t *session, c
filename = switch_core_strdup(pool, u->filename); filename = switch_core_strdup(pool, u->filename);
cache->hits++; cache->hits++;
u->used = 1; u->used = 1;
switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Cache HIT: size = %ld (%ld MB), hit ratio = %d/%d\n", cache->queue.size, cache->size / 1000000, cache->hits, cache->hits + cache->misses); switch_log_printf(SWITCH_CHANNEL_SESSION_LOG(session), SWITCH_LOG_DEBUG, "Cache HIT: size = %z (%z MB), hit ratio = %d/%d\n", cache->queue.size, cache->size / 1000000, cache->hits, cache->hits + cache->misses);
} }
} }
url_cache_unlock(cache, session); url_cache_unlock(cache, session);