Mercurial > hg > freeDiameter
diff libfreeDiameter/sessions.c @ 453:9a8b3178a7a7
Postpone the creation of session expiry thread to allow some global variables to be set (debug level, etc)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 29 Jul 2010 15:32:08 +0900 |
parents | 2b36eccbe426 |
children | 8c9028ec02bf |
line wrap: on
line diff
--- a/libfreeDiameter/sessions.c Thu Jul 29 14:48:19 2010 +0900 +++ b/libfreeDiameter/sessions.c Thu Jul 29 15:32:08 2010 +0900 @@ -231,6 +231,12 @@ 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) );