* Lock the session list, moving any candidates for euthanasia into
* a separate list.
*/
- pthread_mutex_lock(&SessionListMutex);
+ CtdlLogResult(pthread_mutex_lock(&SessionListMutex));
for (sptr = SessionList; sptr != NULL; sptr = sptr->next) {
/* Kill idle sessions */
sessions_to_kill = sptr;
}
}
- pthread_mutex_unlock(&SessionListMutex);
+ CtdlLogResult(pthread_mutex_unlock(&SessionListMutex));
/*
* Now free up and destroy the culled sessions.
GetAuthBasic(Hdr);
}
- pthread_mutex_lock(ListMutex);
+ CtdlLogResult(pthread_mutex_lock(ListMutex));
for (sptr = *wclist; ((sptr != NULL) && (TheSession == NULL)); sptr = sptr->next) {
/* If HTTP-AUTH, look for a session with matching credentials */
break;
}
}
- pthread_mutex_unlock(ListMutex);
+ CtdlLogResult(pthread_mutex_unlock(ListMutex));
if (TheSession == NULL)
lprintf(1, "didn't find sessionkey [%ld] for user [%s]\n",
Hdr->HR.SessionKey,ChrPtr(Hdr->c_username));
pthread_mutex_init(&TheSession->SessionMutex, NULL);
if (ListMutex != NULL)
- pthread_mutex_lock(ListMutex);
+ CtdlLogResult(pthread_mutex_lock(ListMutex));
if (wclist != NULL) {
TheSession->nonce = rand();
*wclist = TheSession;
}
if (ListMutex != NULL)
- pthread_mutex_unlock(ListMutex);
+ CtdlLogResult(pthread_mutex_unlock(ListMutex));
}
return TheSession;
}
/*
* Bind to the session and perform the transaction
*/
- pthread_mutex_lock(&TheSession->SessionMutex); /* bind */
+ CtdlLogResult(pthread_mutex_lock(&TheSession->SessionMutex));
pthread_setspecific(MyConKey, (void *)TheSession);
TheSession->lastreq = time(NULL); /* log */
session_detach_modules(TheSession);
TheSession->Hdr = NULL;
- pthread_mutex_unlock(&TheSession->SessionMutex); /* unbind */
+ CtdlLogResult(pthread_mutex_unlock(&TheSession->SessionMutex));
}
void tmplput_nonce(StrBuf *Target, WCTemplputParams *TP)