diff options
author | Yasuo Ohgaki <yohgaki@php.net> | 2002-01-10 06:15:46 +0000 |
---|---|---|
committer | Yasuo Ohgaki <yohgaki@php.net> | 2002-01-10 06:15:46 +0000 |
commit | 3ea732bb4fe3a5e94e5686c680f419caf0355d56 (patch) | |
tree | 54f1733484043251048dae3f9da098fecfb87819 | |
parent | f4a3603d48a9a3c7d6452cc7d4272d9858abd822 (diff) | |
download | php-git-3ea732bb4fe3a5e94e5686c680f419caf0355d56.tar.gz |
MFH
-rw-r--r-- | ext/session/mod_mm.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/session/mod_mm.c b/ext/session/mod_mm.c index 24ae973238..db0dc6be9c 100644 --- a/ext/session/mod_mm.c +++ b/ext/session/mod_mm.c @@ -35,7 +35,7 @@ # error mm is not thread-safe #endif -#define PS_MM_PATH "/tmp/session_mm" +#define PS_MM_FILE "session_mm" /* For php_uint32 */ #include "ext/standard/basic_functions.h" @@ -247,8 +247,18 @@ static void ps_mm_destroy(ps_mm *data) PHP_MINIT_FUNCTION(ps_mm) { + char *ps_mm_path = calloc(strlen(PS(save_path))+1+strlen(PS_MM_FILE)+1, 1); /* Directory + '/' + File + \0 */ + ps_mm_instance = calloc(sizeof(*ps_mm_instance), 1); - if (ps_mm_initialize(ps_mm_instance, PS_MM_PATH) != SUCCESS) { + + strcpy(ps_mm_path, PS(save_path)); + + if((strlen(ps_mm_path) > 0) && (ps_mm_path[strlen(ps_mm_path)-1] != '/')) + strcat(ps_mm_path, "/"); /* Fixme Windows */ + + strcat(ps_mm_path, PS_MM_FILE); + + if (ps_mm_initialize(ps_mm_instance, ps_mm_path) != SUCCESS) { ps_mm_instance = NULL; return FAILURE; } |