diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 11:05:18 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-05-25 11:05:18 +0200 |
commit | fc0712f40ae63aa54080683c7ee5ae52055c009d (patch) | |
tree | b236e751acbe262a1f334221d523a2f121a3edff /tools | |
parent | e89ae2e7b18ba935d7eea4c44f3ec15ff6dcfb31 (diff) | |
parent | eb1615068c6a704287eda732d287280df4cc4c44 (diff) | |
download | rsyslog-fc0712f40ae63aa54080683c7ee5ae52055c009d.tar.gz rsyslog-fc0712f40ae63aa54080683c7ee5ae52055c009d.tar.bz2 rsyslog-fc0712f40ae63aa54080683c7ee5ae52055c009d.zip |
Merge branch 'master' into ultra-reliable
Conflicts:
tests/Makefile.am
tests/diskqueue.sh
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index 412793e1..e207b5b2 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -353,10 +353,8 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a bDebugPrintModuleList = 1; bEscapeCCOnRcv = 1; /* default is to escape control characters */ bReduceRepeatMsgs = 0; - if(pszMainMsgQFName != NULL) { - free(pszMainMsgQFName); - pszMainMsgQFName = NULL; - } + free(pszMainMsgQFName); + pszMainMsgQFName = NULL; iMainMsgQueueSize = 10000; iMainMsgQHighWtrMark = 8000; iMainMsgQLowWtrMark = 2000; @@ -416,6 +414,26 @@ static int usage(void) } +/* ------------------------------ some support functions for imdiag ------------------------------ * + * This is a bit dirty, but the only way to do it, at least with reasonable effort. + * rgerhards, 2009-05-25 + */ + +/* return back the approximate current number of messages in the main message queue + */ +rsRetVal +diagGetMainMsgQSize(int *piSize) +{ + DEFiRet; + assert(piSize != NULL); + *piSize = pMsgQueue->iQueueSize; + RETiRet; +} + + +/* ------------------------------ end support functions for imdiag ------------------------------ */ + + /* function to destruct a selector_t object * rgerhards, 2007-08-01 */ @@ -2670,7 +2688,6 @@ init(void) ABORT_FINALIZE(RS_RET_VALIDATION_RUN); /* switch the message object to threaded operation, if necessary */ -/* TODO:XXX: I think we must do this also if we have action queues! -- rgerhards, 2009-01-26 */ if(MainMsgQueType == QUEUETYPE_DIRECT || iMainMsgQueueNumWorkers > 1) { MsgEnableThreadSafety(); } |