From: Art Cancro Date: Wed, 20 Jul 2011 15:53:20 +0000 (-0400) Subject: temporary logging for debug X-Git-Tag: v8.11~563 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=38ed9e6caa9adea81550b50428bff4f831188bcd temporary logging for debug --- 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 */