summaryrefslogtreecommitdiff
path: root/ext/session/mod_mm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/session/mod_mm.c')
-rw-r--r--ext/session/mod_mm.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c
index bf48436a7e..d267dd0e1f 100644
--- a/ext/session/mod_mm.c
+++ b/ext/session/mod_mm.c
@@ -122,9 +122,8 @@ static ps_sd *ps_sd_new(ps_mm *data, const char *key)
sd = mm_malloc(data->mm, sizeof(ps_sd) + keylen);
if (!sd) {
- TSRMLS_FETCH();
-
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "mm_malloc failed, avail %ld, err %s", mm_available(data->mm), mm_error());
+
+ php_error_docref(NULL, E_WARNING, "mm_malloc failed, avail %ld, err %s", mm_available(data->mm), mm_error());
return NULL;
}
@@ -208,7 +207,7 @@ static ps_sd *ps_sd_lookup(ps_mm *data, const char *key, int rw)
return ret;
}
-static int ps_mm_key_exists(ps_mm *data, const char *key TSRMLS_DC)
+static int ps_mm_key_exists(ps_mm *data, const char *key)
{
ps_sd *sd;
@@ -357,20 +356,20 @@ PS_READ_FUNC(mm)
/* If there is an ID and strict mode, verify existence */
if (PS(use_strict_mode)
- && ps_mm_key_exists(data, key TSRMLS_CC) == FAILURE) {
+ && ps_mm_key_exists(data, key) == FAILURE) {
/* key points to PS(id), but cannot change here. */
if (key) {
efree(PS(id));
PS(id) = NULL;
}
- PS(id) = PS(mod)->s_create_sid((void **)&data, NULL TSRMLS_CC);
+ PS(id) = PS(mod)->s_create_sid((void **)&data, NULL);
if (!PS(id)) {
return FAILURE;
}
if (PS(use_cookies)) {
PS(send_cookie) = 1;
}
- php_session_reset_id(TSRMLS_C);
+ php_session_reset_id();
PS(session_status) = php_session_active;
}
@@ -411,7 +410,7 @@ PS_WRITE_FUNC(mm)
if (!sd->data) {
ps_sd_destroy(data, sd);
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "cannot allocate new data segment");
+ php_error_docref(NULL, E_WARNING, "cannot allocate new data segment");
sd = NULL;
}
}
@@ -484,9 +483,9 @@ PS_CREATE_SID_FUNC(mm)
PS_MM_DATA;
do {
- sid = php_session_create_id((void **)&data, newlen TSRMLS_CC);
+ sid = php_session_create_id((void **)&data, newlen);
/* Check collision */
- if (ps_mm_key_exists(data, sid TSRMLS_CC) == SUCCESS) {
+ if (ps_mm_key_exists(data, sid) == SUCCESS) {
if (sid) {
efree(sid);
sid = NULL;