Changeset 432 for branches/1.2/xcache.c

Show
Ignore:
Timestamp:
06/29/2007 02:59:36 AM (17 months ago)
Author:
moo
Message:

fixed #109: fast inc/dec was trying to break ro protection

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/1.2/xcache.c

    r428 r432  
    20022002                stored_var = stored_xce->data.var; 
    20032003                if (Z_TYPE_P(stored_var->value) == IS_LONG) { 
     2004                    zval *zv; 
    20042005                    stored_xce->ctime = XG(request_time); 
    20052006                    stored_xce->ttl   = xce.ttl; 
     
    20102011                    value += (inc == 1 ? count : - count); 
    20112012                    RETVAL_LONG(value); 
    2012                     Z_LVAL_P(stored_var->value) = value; 
     2013 
     2014                    zv = (zval *) xce.cache->shm->handlers->to_readwrite(xce.cache->shm, (char *) stored_var->value); 
     2015                    Z_LVAL_P(zv) = value; 
    20132016                    break; /* leave lock */ 
    20142017                }