Changeset 275

Show
Ignore:
Timestamp:
09/19/06 18:29:31 (2 years ago)
Author:
hans
Message:

Get session config variables from local values instead of global values. This enables altering of session-related settings like gc_maxlifetime, entropy_file and entropy_length through ini_set(). This fixes ticket #166

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/branches/0.9.5/ChangeLog

    r272 r275  
     12006-09-19  Hans Rakers <hans at parse dot nl> 
     2 
     3        * Get session config variables from local values instead of global 
     4          values. This enables altering of session-related settings like 
     5          gc_maxlifetime, entropy_file and entropy_length through ini_set(). 
     6          This fixes ticket #166 
     7 
    182006-09-15  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
    29 
  • eaccelerator/branches/0.9.5/session.c

    r228 r275  
    146146        char *skey; 
    147147        int len; 
    148         time_t ttl
     148        time_t ttl = INI_INT("session.gc_maxlifetime")
    149149        zval sval; 
    150         char *tmp; 
    151150 
    152151        len = sizeof("sess_") + strlen(key); 
     
    154153        strcpy(skey, "sess_"); 
    155154        strcat(skey, key); 
    156         if (cfg_get_string("session.gc_maxlifetime", &tmp) == FAILURE) { 
     155        if (!ttl) { 
    157156                ttl = 1440; 
    158         } else { 
    159                 ttl = atoi(tmp); 
    160157        } 
    161158        Z_TYPE(sval) = IS_STRING; 
     
    212209        unsigned char c; 
    213210 
    214         long entropy_length
    215         char *entropy_file
    216  
    217         if (cfg_get_string("session.entropy_length", &entropy_file) == FAILURE) { 
     211        long entropy_length = INI_INT("session.entropy_length")
     212        char *entropy_file = INI_STR("session.entropy_file")
     213 
     214        if (!entropy_length) { 
    218215                entropy_length = 0; 
    219         } else { 
    220                 entropy_length = atoi(entropy_file); 
    221         } 
    222         if (cfg_get_string("session.entropy_file", &entropy_file) == FAILURE) { 
     216        } 
     217        if (!entropy_file) { 
    223218                entropy_file = empty_string; 
    224219        } 
  • eaccelerator/trunk/ChangeLog

    r273 r275  
     12006-09-19  Hans Rakers <hans at parse dot nl> 
     2 
     3        * Get session config variables from local values instead of global 
     4          values. This enables altering of session-related settings like 
     5          gc_maxlifetime, entropy_file and entropy_length through ini_set(). 
     6          This fixes ticket #166 
     7 
    182006-09-18  Hans Rakers <hans at parse dot nl> 
     9 
    210        * Fixed unbalanced ifdef in eaccelerator.h introduced in rev [269]. 
    311          This fixes ticket #177 
  • eaccelerator/trunk/session.c

    r265 r275  
    140140        char *skey; 
    141141        int len; 
    142         time_t ttl
     142        time_t ttl = INI_INT("session.gc_maxlifetime")
    143143        zval sval; 
    144         char *tmp; 
    145144 
    146145        len = sizeof("sess_") + strlen(key); 
     
    148147        strcpy(skey, "sess_"); 
    149148        strcat(skey, key); 
    150         if (cfg_get_string("session.gc_maxlifetime", &tmp) == FAILURE) { 
     149        if (!ttl) { 
    151150                ttl = 1440; 
    152         } else { 
    153                 ttl = atoi(tmp); 
    154151        } 
    155152        Z_TYPE(sval) = IS_STRING; 
     
    205202        unsigned char c; 
    206203 
    207         long entropy_length
    208         char *entropy_file
    209  
    210         if (cfg_get_string("session.entropy_length", &entropy_file) == FAILURE) { 
     204        long entropy_length = INI_INT("session.entropy_length")
     205        char *entropy_file = INI_STR("session.entropy_file")
     206 
     207        if (!entropy_length) { 
    211208                entropy_length = 0; 
    212         } else { 
    213                 entropy_length = atoi(entropy_file); 
    214         } 
    215         if (cfg_get_string("session.entropy_file", &entropy_file) == FAILURE) { 
     209        } 
     210        if (!entropy_file) { 
    216211                entropy_file = empty_string; 
    217212        }