Ignore:
Timestamp:
Feb 27, 2013 12:07:30 PM (11 years ago)
Author:
ming
Message:

Re #1593: Backported to 1.x

Location:
pjproject/branches/1.x
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/branches/1.x

  • pjproject/branches/1.x/pjlib/src/pj/pool_caching.c

    r3553 r4395  
    179179 
    180180        /* Update pool manager's free capacity. */ 
    181         cp->capacity -= pj_pool_get_capacity(pool); 
     181        if (cp->capacity > pj_pool_get_capacity(pool)) { 
     182            cp->capacity -= pj_pool_get_capacity(pool); 
     183        } else { 
     184            cp->capacity = 0; 
     185        } 
    182186 
    183187        PJ_LOG(6, (pool->obj_name, "pool reused, size=%u", pool->capacity)); 
     
    200204{ 
    201205    pj_caching_pool *cp = (pj_caching_pool*)pf; 
    202     unsigned pool_capacity; 
     206    pj_size_t pool_capacity; 
    203207    unsigned i; 
    204208 
Note: See TracChangeset for help on using the changeset viewer.