diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-31 11:40:53 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-01-31 11:40:53 +0000 |
commit | 260e2be5d69d9fe7ec3fd533430b9bd6effd55c0 (patch) | |
tree | bc94bdb0cd6b408eee99a3b0558384f61bfc5c5e /debug.c | |
parent | 77358e12ab9c8a52c81673e24239d7878e7848c9 (diff) | |
download | rsyslog-260e2be5d69d9fe7ec3fd533430b9bd6effd55c0.tar.gz rsyslog-260e2be5d69d9fe7ec3fd533430b9bd6effd55c0.tar.xz rsyslog-260e2be5d69d9fe7ec3fd533430b9bd6effd55c0.zip |
bugfix: dbgoprint mutex - was too simple once I wrote the tracker item ;)
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -57,7 +57,7 @@ static dbgThrdInfo_t *dbgGetThrdInfo(void); /* static data (some time to be replaced) */ int Debug; /* debug flag - read-only after startup */ int debugging_on = 0; /* read-only, except on sig USR1 */ -static int bLogFuncFlow = 1; /* shall the function entry and exit be logged to the debug log? */ +static int bLogFuncFlow = 0; /* shall the function entry and exit be logged to the debug log? */ static int bPrintFuncDBOnExit = 0; /* shall the function entry and exit be logged to the debug log? */ static int bPrintMutexAction = 0; /* shall mutex calls be printed to the debug log? */ static int bPrintTime = 1; /* print a timestamp together with debug message */ @@ -99,6 +99,7 @@ static dbgThrdInfo_t *dbgCallStackListLast = NULL; static pthread_mutex_t mutCallStack = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t mutdbgprintf = PTHREAD_MUTEX_INITIALIZER; +static pthread_mutex_t mutdbgoprint = PTHREAD_MUTEX_INITIALIZER; static pthread_key_t keyCallStack; @@ -705,10 +706,8 @@ dbgoprint(obj_t *pObj, char *fmt, ...) if(!(Debug && debugging_on)) return; -#if 0 - pthread_mutex_lock(&mutdbgprintf); - pthread_cleanup_push(dbgMutexCancelCleanupHdlr, &mutdbgprintf); -#endif + pthread_mutex_lock(&mutdbgoprint); + pthread_cleanup_push(dbgMutexCancelCleanupHdlr, &mutdbgoprint); /* The bWasNL handler does not really work. It works if no thread * switching occurs during non-NL messages. Else, things are messed @@ -765,9 +764,7 @@ dbgoprint(obj_t *pObj, char *fmt, ...) fflush(stddbg); if(altdbg != NULL) fflush(altdbg); -#if 0 pthread_cleanup_pop(1); -#endif } |