Skip to content

Commit c4f239e

Browse files
author
Yasuo Ohgaki
committed
Revert last commit
1 parent 3ea732b commit c4f239e

File tree

1 file changed

+2
-12
lines changed

1 file changed

+2
-12
lines changed

ext/session/mod_mm.c

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# error mm is not thread-safe
3636
#endif
3737

38-
#define PS_MM_FILE "session_mm"
38+
#define PS_MM_PATH "/tmp/session_mm"
3939

4040
/* For php_uint32 */
4141
#include "ext/standard/basic_functions.h"
@@ -247,18 +247,8 @@ static void ps_mm_destroy(ps_mm *data)
247247

248248
PHP_MINIT_FUNCTION(ps_mm)
249249
{
250-
char *ps_mm_path = calloc(strlen(PS(save_path))+1+strlen(PS_MM_FILE)+1, 1); /* Directory + '/' + File + \0 */
251-
252250
ps_mm_instance = calloc(sizeof(*ps_mm_instance), 1);
253-
254-
strcpy(ps_mm_path, PS(save_path));
255-
256-
if((strlen(ps_mm_path) > 0) && (ps_mm_path[strlen(ps_mm_path)-1] != '/'))
257-
strcat(ps_mm_path, "/"); /* Fixme Windows */
258-
259-
strcat(ps_mm_path, PS_MM_FILE);
260-
261-
if (ps_mm_initialize(ps_mm_instance, ps_mm_path) != SUCCESS) {
251+
if (ps_mm_initialize(ps_mm_instance, PS_MM_PATH) != SUCCESS) {
262252
ps_mm_instance = NULL;
263253
return FAILURE;
264254
}

0 commit comments

Comments
 (0)