Changeset 140 in svn for trunk/xcache.c


Ignore:
Timestamp:
2006-09-06T12:14:01Z (9 years ago)
Author:
Xuefer
Message:

fix refcount on cache #1 #2 ...

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r139 r140  
    231231static void xc_entry_hold_php_dmz(xc_entry_t *xce TSRMLS_DC) /* {{{ */
    232232{
     233#ifdef DEBUG
     234    fprintf(stderr, "hold %s\n", ZSTR_S(xce->name));
     235#endif
    233236    xce->refcount ++;
    234237    xc_stack_push(&XG(php_holds)[xce->cache->cacheid], (void *)xce);
     
    585588    for (i = 0; i < cachecount; i ++) {
    586589        s = &holds[i];
     590#ifdef DEBUG
     591        fprintf(stderr, "holded %d\n", xc_stack_size(s));
     592#endif
    587593        if (xc_stack_size(s)) {
    588594            cache = ((xc_entry_t *)xc_stack_top(s))->cache;
    589595            ENTER_LOCK(cache) {
    590                 while (xc_stack_size(holds)) {
    591                     xce = (xc_entry_t*) xc_stack_pop(holds);
     596                while (xc_stack_size(s)) {
     597                    xce = (xc_entry_t*) xc_stack_pop(s);
     598#ifdef DEBUG
     599                    fprintf(stderr, "unhold %s\n", ZSTR_S(xce->name));
     600#endif
    592601                    xce->refcount --;
    593602                    assert(xce->refcount >= 0);
Note: See TracChangeset for help on using the changeset viewer.