From 38ed9e6caa9adea81550b50428bff4f831188bcd Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Wed, 20 Jul 2011 11:53:20 -0400 Subject: [PATCH] temporary logging for debug --- webcit/context_loop.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/webcit/context_loop.c b/webcit/context_loop.c index f9238ab6a..ebbd75efb 100644 --- a/webcit/context_loop.c +++ b/webcit/context_loop.c @@ -194,6 +194,7 @@ wcsession *FindSession(wcsession **wclist, ParsedHttpHdrs *Hdr, pthread_mutex_t * also NOT CURRENTLY LOCKED. This will cause the proper size pool * to be created. */ + syslog(LOG_DEBUG, "\033[32mREUSING A SESSION\033[0m"); TheSession = sptr; } break; @@ -583,7 +584,11 @@ void context_loop(ParsedHttpHdrs *Hdr) /* * Bind to the session and perform the transaction */ - CtdlLogResult(pthread_mutex_lock(&TheSession->SessionMutex)); + if (pthread_mutex_lock(&TheSession->SessionMutex)) { + syslog(LOG_DEBUG, "\033[31mWAITING FOR SESSION LOCK\033[0m"); + CtdlLogResult(pthread_mutex_lock(&TheSession->SessionMutex)); + } + pthread_setspecific(MyConKey, (void *)TheSession); TheSession->lastreq = time(NULL); /* log */ -- 2.30.2