diff options
Diffstat (limited to 'pjlib')
-rw-r--r-- | pjlib/src/pj/config.c | 2 | ||||
-rw-r--r-- | pjlib/src/pj/hash.c | 8 | ||||
-rw-r--r-- | pjlib/src/pj/os_error_win32.c | 7 | ||||
-rw-r--r-- | pjlib/src/pj/pool.c | 2 | ||||
-rw-r--r-- | pjlib/src/pj/pool_caching.c | 4 |
5 files changed, 15 insertions, 8 deletions
diff --git a/pjlib/src/pj/config.c b/pjlib/src/pj/config.c index 13e36044..8d14a114 100644 --- a/pjlib/src/pj/config.c +++ b/pjlib/src/pj/config.c @@ -21,7 +21,7 @@ #include <pj/ioqueue.h> static const char *id = "config.c"; -const char *PJ_VERSION = "0.3.0-pre4"; +const char *PJ_VERSION = "0.5"; PJ_DEF(void) pj_dump_config(void) { diff --git a/pjlib/src/pj/hash.c b/pjlib/src/pj/hash.c index 28d6d0ff..739f2757 100644 --- a/pjlib/src/pj/hash.c +++ b/pjlib/src/pj/hash.c @@ -91,7 +91,7 @@ PJ_DEF(pj_hash_table_t*) pj_hash_create(pj_pool_t *pool, unsigned size) h = pj_pool_alloc(pool, sizeof(pj_hash_table_t)); h->count = 0; - PJ_LOG( 5, ("hashtbl", "hash table %p created from pool %s", h, pj_pool_getobjname(pool))); + PJ_LOG( 6, ("hashtbl", "hash table %p created from pool %s", h, pj_pool_getobjname(pool))); /* size must be 2^n - 1. round-up the size to this rule, except when size is 2^n, then size @@ -147,7 +147,7 @@ static pj_hash_entry **find_entry( pj_pool_t *pool, pj_hash_table_t *ht, /* create a new entry */ entry = pj_pool_alloc(pool, sizeof(pj_hash_entry)); - PJ_LOG(5, ("hashtbl", "%p: New p_entry %p created, pool used=%u, cap=%u", ht, entry, + PJ_LOG(6, ("hashtbl", "%p: New p_entry %p created, pool used=%u, cap=%u", ht, entry, pj_pool_get_used_size(pool), pj_pool_get_capacity(pool))); entry->next = NULL; entry->hash = hash; @@ -179,14 +179,14 @@ PJ_DEF(void) pj_hash_set( pj_pool_t *pool, pj_hash_table_t *ht, if (*p_entry) { if (value == NULL) { /* delete entry */ - PJ_LOG(5, ("hashtbl", "%p: p_entry %p deleted", ht, *p_entry)); + PJ_LOG(6, ("hashtbl", "%p: p_entry %p deleted", ht, *p_entry)); *p_entry = (*p_entry)->next; --ht->count; } else { /* overwrite */ (*p_entry)->value = value; - PJ_LOG(5, ("hashtbl", "%p: p_entry %p value set to %p", ht, *p_entry, value)); + PJ_LOG(6, ("hashtbl", "%p: p_entry %p value set to %p", ht, *p_entry, value)); } } } diff --git a/pjlib/src/pj/os_error_win32.c b/pjlib/src/pj/os_error_win32.c index cbc87eba..5001af4a 100644 --- a/pjlib/src/pj/os_error_win32.c +++ b/pjlib/src/pj/os_error_win32.c @@ -153,6 +153,13 @@ int platform_strerror( pj_os_err_type os_errcode, break; } } + + } else { + /* Remove trailing newlines. */ + while (len && (buf[len-1] == '\n' || buf[len-1] == '\r')) { + buf[len-1] = '\0'; + --len; + } } if (!len) { diff --git a/pjlib/src/pj/pool.c b/pjlib/src/pj/pool.c index 06cc009d..11f59278 100644 --- a/pjlib/src/pj/pool.c +++ b/pjlib/src/pj/pool.c @@ -28,7 +28,7 @@ # include <pj/pool_i.h> #endif -#define LOG(expr) PJ_LOG(5,expr) +#define LOG(expr) PJ_LOG(6,expr) int PJ_NO_MEMORY_EXCEPTION; diff --git a/pjlib/src/pj/pool_caching.c b/pjlib/src/pj/pool_caching.c index f59ee377..5f5200f4 100644 --- a/pjlib/src/pj/pool_caching.c +++ b/pjlib/src/pj/pool_caching.c @@ -137,7 +137,7 @@ static pj_pool_t* cpool_create_pool(pj_pool_factory *pf, /* Update pool manager's free capacity. */ cp->capacity -= pj_pool_get_capacity(pool); - PJ_LOG(5, (pool->obj_name, "pool reused, size=%u", pool->capacity)); + PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", pool->capacity)); } /* Put in used list. */ @@ -173,7 +173,7 @@ static void cpool_release_pool( pj_pool_factory *pf, pj_pool_t *pool) } /* Reset pool. */ - PJ_LOG(4, (pool->obj_name, "recycle(): cap=%d, used=%d(%d%%)", + PJ_LOG(6, (pool->obj_name, "recycle(): cap=%d, used=%d(%d%%)", pool->capacity, pj_pool_get_used_size(pool), pj_pool_get_used_size(pool)*100/pool->capacity)); pj_pool_reset(pool); |