]> granicus.if.org Git - php/commitdiff
revert last commit. Guys, discuss such things first, then commit. Mkay?
authorSascha Schumann <sas@php.net>
Tue, 11 Sep 2001 10:16:01 +0000 (10:16 +0000)
committerSascha Schumann <sas@php.net>
Tue, 11 Sep 2001 10:16:01 +0000 (10:16 +0000)
ext/session/session.c

index 5edb0d4fd1591869a15f693e765509bd51f22596..3e9f9931f364b5f6e097b1b0aea8778891ea3ae6 100644 (file)
@@ -211,15 +211,6 @@ int php_session_register_module(ps_module *ptr)
        return ret;
 }
 
-PHPAPI void php_session_set_id(char *id TSRMLS_DC)
-{
-       if (PS(id))
-               efree(PS(id));
-
-       PS(id) = estrdup(id);
-}
-
-
 PHP_MINIT_FUNCTION(session);
 PHP_RINIT_FUNCTION(session);
 PHP_MSHUTDOWN_FUNCTION(session);
@@ -964,6 +955,7 @@ static zend_bool php_session_destroy(TSRMLS_D)
        return retval;
 }
 
+
 /* {{{ proto void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure]]])
    Set session cookie parameters */
 PHP_FUNCTION(session_set_cookie_params)
@@ -1140,7 +1132,8 @@ PHP_FUNCTION(session_id)
 
        if (ac == 1) {
                convert_to_string_ex(p_name);
-               php_session_set_id(Z_STRVAL_PP(p_name) TSRMLS_CC);
+               if (PS(id)) efree(PS(id));
+               PS(id) = estrndup(Z_STRVAL_PP(p_name), Z_STRLEN_PP(p_name));
        }
        
        RETVAL_STRING(old, 0);