libCom/errlog: Clean up possible problem at shutdown.

Don't use epicsMutexMustLock() in msgbufGetFree().
When we're shutting down, the pvtData.msgQueueLock gets destroyed.
This makes msgbufGetFree() return NULL if the lock is dead.
The epicsMutexMustLock() routine asserts(), which recurses...
This commit is contained in:
Andrew Johnson
2010-11-15 15:46:40 -06:00
parent fb493a064c
commit c503a03f37

View File

@@ -552,7 +552,9 @@ static char *msgbufGetFree(int noConsoleMessage)
{
msgNode *pnextSend;
epicsMutexMustLock(pvtData.msgQueueLock);
if (epicsMutexLock(pvtData.msgQueueLock) != epicsMutexLockOK)
return 0;
if ((ellCount(&pvtData.msgQueue) == 0) && pvtData.missedMessages) {
int nchar;