[Klone-users] Sessions- bug?
diakat 2000
diakat2000 at googlemail.com
Tue Sep 30 11:07:05 EDT 2008
Hello again,
sorry, but the session max_age already does not work.
So I had a look at your code
(http://www.koanlogic.com/klone/api/html/session_8c-source.html):
00052 int session_module_init(u_config_t *config, session_opt_t **pso)
00053 {
... // firstly you set a defalut max_age (so->max_age):
00065 /* defaults values */
00066 so->type = SESSION_TYPE_FILE;
00067 so->max_age = DEFAULT_SESSION_EXPIRATION;
00068 so->compress = 0;
00069 so->encrypt = 0;
...
// the you set the max_age with user-value, but here you use a local variable:
00091 /* set max_age */
00092 if((v = u_config_get_subkey_value(c, "max_age")) != NULL)
00093 max_age = MAX(atoi(v) * 60, 60); /* min value: 1 min */
00094
00095 /* set compression flag */
....
//when youe create the session you use the so->max_age, so the user
max_age never used:
00780 int session_create(session_opt_t *so, request_t *rq, response_t *rs,
00781 session_t **pss)
00782 {
....
00810 dbg_ifb(session_age(ss) > so->max_age)
00811 {
00812 session_clean(ss); /* remove all session variables */
00813 session_remove(ss); /* remove the session itself */
00814 }
Please, could you have a look at this.
Maybe I'm wrong, but if not: could you fix this, please?!
I just want to set the session expiration time.
Best Regards,
More information about the klone-users
mailing list