From a13bf6cc0e21aa35b40c6ec687f7f3f92607ba02 Mon Sep 17 00:00:00 2001 From: Marty Kraimer Date: Wed, 8 Mar 2000 18:49:56 +0000 Subject: [PATCH] prevent recursive calls if errlogInit fails --- src/libCom/error/errlog.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/libCom/error/errlog.c b/src/libCom/error/errlog.c index e453e6d77..4a4e02588 100644 --- a/src/libCom/error/errlog.c +++ b/src/libCom/error/errlog.c @@ -76,6 +76,7 @@ LOCAL struct { ELLLIST listenerList; ELLLIST msgQueue; msgNode *pnextSend; + int errlogInitFailed; int buffersize; int sevToLog; int toConsole; @@ -295,13 +296,13 @@ epicsShareFunc void epicsShareAPIV errPrintf(long status, const char *pFileName, msgbufSetSize(totalChar); } -typedef struct {int bufsize;} errlogInitArg; - static void errlogInitPvt(void *arg) { - int bufsize = ((errlogInitArg *)arg)->bufsize; + int bufsize = *(int *)arg; void *pbuffer; + threadId tid; + pvtData.errlogInitFailed = TRUE; if(bufsize