summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>2000-09-29 21:44:45 +0000
committerSascha Schumann <sas@php.net>2000-09-29 21:44:45 +0000
commit11c88a0ff5cd267ee7001817435e9da8f614529d (patch)
treee9ecb895fbf11a2718e82fe83c6a097c840f8df8
parent3be464e4ec409be06806bf71cbd5dd9aa8960ee9 (diff)
downloadphp-git-11c88a0ff5cd267ee7001817435e9da8f614529d.tar.gz
Return SUCCESS from write handler, if vallen is 0.
Submitted by: tcarroll@chc-chimes.com PR: #6958
-rw-r--r--ext/session/mod_mm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index c8d4e374e3..7255165e32 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -117,7 +117,7 @@ static ps_sd *ps_sd_new(ps_mm *data, const char *key, const void *sdata, size_t
sd->next->prev = sd;
sd->prev = NULL;
- ps_mm_debug("inserting %s(%x) into %d\n", key, sd, h);
+ ps_mm_debug("inserting %s(%p) into %d\n", key, sd, h);
data->hash[h] = sd;
@@ -162,7 +162,7 @@ static ps_sd *ps_sd_lookup(ps_mm *data, const char *key, int rw)
ps_mm_debug("optimizing\n");
}
- ps_mm_debug(stderr, "lookup(%s): ret=%x,h=%d\n", key, ret, h);
+ ps_mm_debug(stderr, "lookup(%s): ret=%p,h=%d\n", key, ret, h);
return ret;
}
@@ -213,7 +213,7 @@ PHP_GSHUTDOWN_FUNCTION(ps_mm)
PS_OPEN_FUNC(mm)
{
- ps_mm_debug("open: ps_mm_instance=%x\n", ps_mm_instance);
+ ps_mm_debug("open: ps_mm_instance=%p\n", ps_mm_instance);
if (!ps_mm_instance)
return FAILURE;
@@ -256,6 +256,8 @@ PS_WRITE_FUNC(mm)
PS_MM_DATA;
ps_sd *sd;
+ if (vallen == 0) return SUCCESS;
+
mm_lock(data->mm, MM_LOCK_RW);
sd = ps_sd_lookup(data, key, 1);