]> granicus.if.org Git - php/commitdiff
MFH define_sid issue
authorSascha Schumann <sas@php.net>
Tue, 23 Apr 2002 18:10:06 +0000 (18:10 +0000)
committerSascha Schumann <sas@php.net>
Tue, 23 Apr 2002 18:10:06 +0000 (18:10 +0000)
ext/session/session.c

index e94ab967aa02e2127aa1896054d470597475cfc7..9e0993dbf638926b18d7f9510958fb2925b5b533 100644 (file)
@@ -833,6 +833,7 @@ PHPAPI void php_session_start(TSRMLS_D)
        zval **data;
        char *p;
        int send_cookie = 1;
+       int define_sid = 1;
        int module_number = PS(module_number);
        int nrand;
        int lensess;
@@ -846,7 +847,7 @@ PHPAPI void php_session_start(TSRMLS_D)
        
 
        /*
-     * Cookies are preferred, because initially
+        * Cookies are preferred, because initially
         * cookie and get variables will be available. 
         */
 
@@ -859,6 +860,7 @@ PHPAPI void php_session_start(TSRMLS_D)
                        PPID2SID;
                        PS(apply_trans_sid) = 0;
                        send_cookie = 0;
+                       define_sid = 0;
                }
 
                if (!PS(id) &&
@@ -930,8 +932,7 @@ PHPAPI void php_session_start(TSRMLS_D)
        }
 
 
-       /* define SID always, if the client did not send a cookie */
-       if (send_cookie) {
+       if (define_sid) {
                smart_str var = {0};
 
                smart_str_appends(&var, PS(session_name));