Mercurial > hg > freeDiameter
diff libfdproto/sessions.c @ 686:f83d9878bf66
Fixed in case of termination of several modules (before initialization completed)
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Wed, 19 Jan 2011 14:35:14 +0900 |
parents | 2e94ef0515d7 |
children | 78b665400097 |
line wrap: on
line diff
--- a/libfdproto/sessions.c Wed Jan 19 11:11:23 2011 +0900 +++ b/libfdproto/sessions.c Wed Jan 19 14:35:14 2011 +0900 @@ -121,7 +121,7 @@ static struct fd_list exp_sentinel = FD_LIST_INITIALIZER(exp_sentinel); /* list of sessions ordered by their timeout date */ static pthread_mutex_t exp_lock = PTHREAD_MUTEX_INITIALIZER; /* lock protecting the list. */ static pthread_cond_t exp_cond = PTHREAD_COND_INITIALIZER; /* condvar used by the expiry mecahinsm. */ -static pthread_t exp_thr; /* The expiry thread that handles cleanup of expired sessions */ +static pthread_t exp_thr = (pthread_t)NULL; /* The expiry thread that handles cleanup of expired sessions */ /* Hierarchy of the locks, to avoid deadlocks: * hash lock > state lock > expiry lock