Commit fd11dda9 authored by Sebastien Decugis's avatar Sebastien Decugis
Browse files

Postpone the creation of session expiry thread to allow some global variables...

Postpone the creation of session expiry thread to allow some global variables to be set (debug level, etc)
parent 7fccbed7
......@@ -94,6 +94,7 @@ int main(int argc, char * argv[])
/* Initialize other modules */
CHECK_FCT( fd_queues_init() );
CHECK_FCT( fd_msg_init() );
CHECK_FCT( fd_sess_start() );
CHECK_FCT( fd_p_expi_init() );
/* Parse the configuration file */
......
......@@ -1509,6 +1509,9 @@ struct session;
/* The state information that a module associate with a session -- each module defines its own data format */
typedef void session_state;
/* The following function must be called to activate the session expiry mechanism */
int fd_sess_start(void);
/*
* FUNCTION: fd_sess_handler_create
*
......
......@@ -231,6 +231,12 @@ int fd_sess_init(void)
CHECK_POSIX( pthread_mutex_init(&sess_hash[i].lock, NULL) );
}
return 0;
}
/* Run this when initializations are complete. */
int fd_sess_start(void)
{
/* Start session garbage collector (expiry) */
CHECK_POSIX( pthread_create(&exp_thr, NULL, exp_fct, NULL) );
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment