summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--debug.c11
-rw-r--r--queue.c9
-rw-r--r--syslogd.c1
-rw-r--r--wti.c6
5 files changed, 10 insertions, 20 deletions
diff --git a/ChangeLog b/ChangeLog
index 2a8fc2a6..a6cdce39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
---------------------------------------------------------------------------
-Version 3.11.1 (rgerhards), 2008-02-??
+Version 3.11.1 (rgerhards), 2008-02-12
+- SNMP trap sender added thanks to Andre Lorbach (omsnmp)
- added input-plugin interface specification in form of a (copy) template
input module
- applied documentation fix by Michael Biebl -- many thanks!
diff --git a/debug.c b/debug.c
index 4da36cc6..b46c17b0 100644
--- a/debug.c
+++ b/debug.c
@@ -518,7 +518,10 @@ int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD
int ret;
dbgRecordExecLocation(iStackPtr, ln);
dbgMutexUnlockLog(pmut, pFuncDB, ln);
- dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond);
+ if(bPrintMutexAction) {
+ dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line,
+ pFuncDB->func, (void*)pmut, (void*)cond);
+ }
dbgMutexPreLockLog(pmut, pFuncDB, ln);
ret = pthread_cond_wait(cond, pmut);
return ret;
@@ -532,8 +535,10 @@ int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct t
dbgRecordExecLocation(iStackPtr, ln);
dbgMutexUnlockLog(pmut, pFuncDB, ln);
dbgMutexPreLockLog(pmut, pFuncDB, ln);
- dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file, pFuncDB->line, pFuncDB->func,
- (void*)pmut, (void*)cond);
+ if(bPrintMutexAction) {
+ dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file,
+ pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond);
+ }
ret = pthread_cond_timedwait(cond, pmut, abstime);
dbgMutexLockLog(pmut, pFuncDB, ln);
return ret;
diff --git a/queue.c b/queue.c
index 60c41c19..03103b70 100644
--- a/queue.c
+++ b/queue.c
@@ -1069,7 +1069,6 @@ static rsRetVal queueShutdownWorkers(queue_t *pThis)
/* first calculate absolute timeout - we need the absolute value here, because we need to coordinate
* shutdown of both the regular and DA queue on *the same* timeout.
*/
-RUNLOG_VAR("%d", pThis->toQShutdown);
timeoutComp(&tTimeout, pThis->toQShutdown);
dbgoprint((obj_t*) pThis, "trying shutdown of regular workers\n");
iRetLocal = wtpShutdownAll(pThis->pWtpReg, wtpState_SHUTDOWN, &tTimeout);
@@ -1439,7 +1438,6 @@ queueConsumerReg(queue_t *pThis, wti_t *pWti, int iCancelStateSave)
}
finalize_it:
- dbgoprint((obj_t*) pThis, "regular consumer returns %d\n", iRet);
RETiRet;
}
@@ -1560,8 +1558,6 @@ queueRegOnWrkrShutdown(queue_t *pThis)
ISOBJ_TYPE_assert(pThis, queue);
if(pThis->pqParent != NULL) {
-RUNLOG_VAR("%p", pThis->pqParent);
-RUNLOG_VAR("%p", pThis->pqParent->pWtpDA);
ASSERT(pThis->pqParent->pWtpDA != NULL);
pThis->pqParent->bChildIsDone = 1; /* indicate we are done */
wtpAdviseMaxWorkers(pThis->pqParent->pWtpDA, 1); /* reactivate DA worker (always 1) */
@@ -1649,16 +1645,13 @@ rsRetVal queueStart(queue_t *pThis) /* this is the ConstructionFinalizer */
CHKiRet(wtpConstructFinalize (pThis->pWtpReg));
/* initialize worker thread instances */
-RUNLOG_VAR("%d", pThis->bIsDA);
if(pThis->bIsDA) {
/* If we are disk-assisted, we need to check if there is a QIF file
* which we need to load. -- rgerhards, 2008-01-15
*/
iRetLocal = queueHaveQIF(pThis);
-RUNLOG_VAR("%d", iRetLocal);
if(iRetLocal == RS_RET_OK) {
dbgoprint((obj_t*) pThis, "on-disk queue present, needs to be reloaded\n");
-RUNLOG;
queueInitDA(pThis, QUEUE_MODE_ENQDEQ, LOCK_MUTEX); /* initiate DA mode */
bInitialized = 1; /* we are done */
} else {
@@ -1668,7 +1661,6 @@ RUNLOG;
}
}
-RUNLOG_VAR("%d", bInitialized);
if(!bInitialized) {
dbgoprint((obj_t*) pThis, "queue starts up without (loading) any DA disk state (this is normal for the DA "
"queue itself!)\n");
@@ -1934,7 +1926,6 @@ queueEnqObj(queue_t *pThis, void *pUsr)
ISOBJ_TYPE_assert(pThis, queue);
-RUNLOG_VAR("%d", pThis->bRunsDA);
/* Please note that this function is not cancel-safe and consequently
* sets the calling thread's cancelibility state to PTHREAD_CANCEL_DISABLE
* during its execution. If that is not done, race conditions occur if the
diff --git a/syslogd.c b/syslogd.c
index df67fe06..62c751c7 100644
--- a/syslogd.c
+++ b/syslogd.c
@@ -2396,7 +2396,6 @@ static void doDie(int sig)
{
static int iRetries = 0; /* debug aid */
dbgprintf("DoDie called.\n");
- dbgPrintAllDebugInfo();
if(iRetries++ == 4) {
dbgprintf("DoDie called 5 times - unconditional exit\n");
exit(1);
diff --git a/wti.c b/wti.c
index a1b60254..db31f4dd 100644
--- a/wti.c
+++ b/wti.c
@@ -330,7 +330,6 @@ wtiWorker(wti_t *pThis)
/* now we have our identity, on to real processing */
while(1) { /* loop will be broken below - need to do mutex locks */
-dbgprintf("%s: start worker run, queue cmd currently %d\n", wtiGetDbgHdr(pThis), pThis->tCurrCmd);
/* process any pending thread requests */
wtpProcessThrdChanges(pWtp);
pthread_testcancel(); /* see big comment in function header */
@@ -352,10 +351,7 @@ dbgprintf("%s: start worker run, queue cmd currently %d\n", wtiGetDbgHdr(pThis),
dbgprintf("%s: worker IDLE, waiting for work.\n", wtiGetDbgHdr(pThis));
pWtp->pfOnIdle(pWtp->pUsr, MUTEX_ALREADY_LOCKED);
- dbgprintf("%s: pre condwait ->notEmpty, worker shutdown %d\n",
- wtiGetDbgHdr(pThis), pThis->pWtp->toWrkShutdown); // DEL
if(pWtp->toWrkShutdown == -1) {
- dbgprintf("worker never times out!\n"); // DEL
/* never shut down any started worker */
d_pthread_cond_wait(pWtp->pcondBusy, pWtp->pmutUsr);
} else {
@@ -365,13 +361,11 @@ dbgprintf("%s: start worker run, queue cmd currently %d\n", wtiGetDbgHdr(pThis),
bInactivityTOOccured = 1; /* indicate we had a timeout */
}
}
- dbgprintf("%s: post condwait ->Busy or timeout\n", wtiGetDbgHdr(pThis)); // DEL
END_MTX_PROTECTED_OPERATIONS(pWtp->pmutUsr);
continue; /* request next iteration */
}
/* if we reach this point, we have a non-empty queue (and are still protected by mutex) */
- dbgprintf("%s: calling consumer\n", wtiGetDbgHdr(pThis));
pWtp->pfDoWork(pWtp->pUsr, pThis, iCancelStateSave);
}