Browse Source

merged [431] from b1.2: fast inc/dec was trying to break ro protection

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@433 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
3.0
Xuefer 14 years ago
parent
commit
1f1be4a9c6
  1. 1
      ChangeLog
  2. 5
      xcache.c

1
ChangeLog

@ -9,6 +9,7 @@ ChangeLog
* could not show module info in admin page when XCache is the last module
* wrong http auth realm
* #86: remove/edit variable in admin page
* fixed #109: fast inc/dec was trying to break ro protection
* fixed #101, #105: Fixed compatibility issue for apache 1.x
* fixed #94: Garbage collector disabled when xcache.cacher set to off
* fixed #92: Zend Optimizer compatibility issue

5
xcache.c

@ -2185,13 +2185,16 @@ static inline void xc_var_inc_dec(int inc, INTERNAL_FUNCTION_PARAMETERS) /* {{{
/* do it in place */
stored_var = stored_xce->data.var;
if (Z_TYPE_P(stored_var->value) == IS_LONG) {
zval *zv;
stored_xce->ctime = XG(request_time);
stored_xce->ttl = xce.ttl;
TRACE("%s", "incdec: islong");
value = Z_LVAL_P(stored_var->value);
value += (inc == 1 ? count : - count);
RETVAL_LONG(value);
Z_LVAL_P(stored_var->value) = value;
zv = (zval *) xce.cache->shm->handlers->to_readwrite(xce.cache->shm, (char *) stored_var->value);
Z_LVAL_P(zv) = value;
break; /* leave lock */
}
else {

Loading…
Cancel
Save