projects
/
citadel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c58d447
)
temporary logging for debug
author
Art Cancro
<ajc@uncensored.citadel.org>
Wed, 20 Jul 2011 15:53:20 +0000
(11:53 -0400)
committer
Wilfried Goesgens
<dothebart@citadel.org>
Sun, 4 Sep 2011 21:38:22 +0000
(21:38 +0000)
webcit/context_loop.c
patch
|
blob
|
history
diff --git
a/webcit/context_loop.c
b/webcit/context_loop.c
index f9238ab6aee14d3e97669d76932371eacdc9bc42..ebbd75efb92c9ccfd1cfeb353c01c20adb3d54c0 100644
(file)
--- 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.
*/
* 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;
TheSession = sptr;
}
break;
@@
-583,7
+584,11
@@
void context_loop(ParsedHttpHdrs *Hdr)
/*
* Bind to the session and perform the transaction
*/
/*
* 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 */
pthread_setspecific(MyConKey, (void *)TheSession);
TheSession->lastreq = time(NULL); /* log */