Changeset 141 in svn for branches/1.0


Ignore:
Timestamp:
2006-09-07T11:40:09Z (9 years ago)
Author:
Xuefer
Message:

fix cache clear corrupted bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/xcache.c

    r86 r141  
    403403            if (cache->deletes) {
    404404                last = (xc_delete_t *) &cache->deletes;
    405                 for (p = *last; p; p = p->next) {
     405                for (p = *last; p; p = *last) {
    406406                    if (t - p->dtime > 3600) {
    407407                        p->refcount = 0;
     
    12071207        case XC_OP_CLEAR:
    12081208            {
    1209                 xc_entry_t *e;
     1209                xc_entry_t *e, *next;
    12101210                int i, c;
    12111211
     
    12181218                ENTER_LOCK(cache) {
    12191219                    for (i = 0, c = cache->hentry->size; i < c; i ++) {
    1220                         for (e = cache->entries[i]; e; e = e->next) {
     1220                        for (e = cache->entries[i]; e; e = next) {
     1221                            next = e->next;
    12211222                            xc_entry_remove_dmz(e TSRMLS_CC);
    12221223                        }
Note: See TracChangeset for help on using the changeset viewer.