Changeset 141 in svn for trunk


Ignore:
Timestamp:
2006-09-07T13:40:09+02:00 (9 years ago)
Author:
Xuefer
Message:

fix cache clear corrupted bug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xcache.c

    r140 r141  
    343343
    344344    pp = &cache->deletes;
    345     for (p = *pp; p; p = p->next) {
     345    for (p = *pp; p; p = *pp) {
    346346        if (XG(request_time) - p->dtime > 3600) {
    347347            p->refcount = 0;
     
    14891489        case XC_OP_CLEAR:
    14901490            {
    1491                 xc_entry_t *e;
     1491                xc_entry_t *e, *next;
    14921492                int i, c;
    14931493
     
    15001500                ENTER_LOCK(cache) {
    15011501                    for (i = 0, c = cache->hentry->size; i < c; i ++) {
    1502                         for (e = cache->entries[i]; e; e = e->next) {
     1502                        for (e = cache->entries[i]; e; e = next) {
     1503                            next = e->next;
    15031504                            xc_entry_remove_dmz(e TSRMLS_CC);
    15041505                        }
Note: See TracChangeset for help on using the changeset viewer.