summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--runtime/parser.c6
-rw-r--r--tcps_sess.c10
-rw-r--r--tcpsrv.c13
-rw-r--r--tools/pmrfc3164.c4
4 files changed, 16 insertions, 17 deletions
diff --git a/runtime/parser.c b/runtime/parser.c
index a79f2ce8..f0515484 100644
--- a/runtime/parser.c
+++ b/runtime/parser.c
@@ -180,7 +180,7 @@ AddDfltParser(uchar *pName)
CHKiRet(FindParser(&pParser, pName));
CHKiRet(AddParserToList(&pDfltParsLst, pParser));
- dbgprintf("Parser '%s' added to default parser set.\n", pName);
+ DBGPRINTF("Parser '%s' added to default parser set.\n", pName);
finalize_it:
RETiRet;
@@ -209,7 +209,7 @@ finalize_it:
BEGINobjDestruct(parser) /* be sure to specify the object type also in END and CODESTART macros! */
CODESTARTobjDestruct(parser)
- dbgprintf("destructing parser '%s'\n", pThis->pName);
+ DBGPRINTF("destructing parser '%s'\n", pThis->pName);
free(pThis->pName);
ENDobjDestruct(parser)
@@ -521,7 +521,7 @@ ParseMsg(msg_t *pMsg)
bIsSanitized = TRUE;
}
localRet = pParser->pModule->mod.pm.parse(pMsg);
- dbgprintf("Parser '%s' returned %d\n", pParser->pName, localRet);
+ DBGPRINTF("Parser '%s' returned %d\n", pParser->pName, localRet);
if(localRet != RS_RET_COULD_NOT_PARSE)
break;
pParserList = pParserList->pNext;
diff --git a/tcps_sess.c b/tcps_sess.c
index eb3740e4..e7149cb7 100644
--- a/tcps_sess.c
+++ b/tcps_sess.c
@@ -323,7 +323,7 @@ PrepareClose(tcps_sess_t *pThis)
* of message may occur. As such, we process the message in
* this case.
*/
- dbgprintf("Extra data at end of stream in legacy syslog/tcp message - processing\n");
+ DBGPRINTF("Extra data at end of stream in legacy syslog/tcp message - processing\n");
datetime.getCurrTime(&stTime, &ttGenTime);
defaultDoSubmitMessage(pThis, &stTime, ttGenTime, NULL);
}
@@ -382,21 +382,21 @@ processDataRcvd(tcps_sess_t *pThis, char c, struct syslogTime *stTime, time_t tt
if(isdigit(c)) {
pThis->iOctetsRemain = pThis->iOctetsRemain * 10 + c - '0';
} else { /* done with the octet count, so this must be the SP terminator */
- dbgprintf("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain);
+ DBGPRINTF("TCP Message with octet-counter, size %d.\n", pThis->iOctetsRemain);
if(c != ' ') {
errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
"delimiter is not SP but has ASCII value %d.\n", c);
}
if(pThis->iOctetsRemain < 1) {
/* TODO: handle the case where the octet count is 0! */
- dbgprintf("Framing Error: invalid octet count\n");
+ DBGPRINTF("Framing Error: invalid octet count\n");
errmsg.LogError(0, NO_ERRCODE, "Framing Error in received TCP message: "
"invalid octet count %d.\n", pThis->iOctetsRemain);
} else if(pThis->iOctetsRemain > iMaxLine) {
/* while we can not do anything against it, we can at least log an indication
* that something went wrong) -- rgerhards, 2008-03-14
*/
- dbgprintf("truncating message with %d octets - max msg size is %d\n",
+ DBGPRINTF("truncating message with %d octets - max msg size is %d\n",
pThis->iOctetsRemain, iMaxLine);
errmsg.LogError(0, NO_ERRCODE, "received oversize message: size is %d bytes, "
"max msg size is %d, truncating...\n", pThis->iOctetsRemain, iMaxLine);
@@ -407,7 +407,7 @@ processDataRcvd(tcps_sess_t *pThis, char c, struct syslogTime *stTime, time_t tt
assert(pThis->inputState == eInMsg);
if(pThis->iMsg >= iMaxLine) {
/* emergency, we now need to flush, no matter if we are at end of message or not... */
- dbgprintf("error: message received is larger than max msg size, we split it\n");
+ DBGPRINTF("error: message received is larger than max msg size, we split it\n");
defaultDoSubmitMessage(pThis, stTime, ttGenTime, pMultiSub);
/* we might think if it is better to ignore the rest of the
* message than to treat it as a new one. Maybe this is a good
diff --git a/tcpsrv.c b/tcpsrv.c
index 0e6e13d2..df5f2a5f 100644
--- a/tcpsrv.c
+++ b/tcpsrv.c
@@ -596,7 +596,6 @@ processWorksetItem(tcpsrv_t *pThis, nspoll_t *pPoll, int idx, void *pUsr)
iRet = SessAccept(pThis, pThis->ppLstnPort[idx], &pNewSess, pThis->ppLstn[idx]);
if(iRet == RS_RET_OK) {
if(pPoll != NULL) {
- dbgprintf("XXXXXX: processWorksetItem trying nspoll.ctl\n");
CHKiRet(nspoll.Ctl(pPoll, pNewSess->pStrm, 0, pNewSess, NSDPOLL_IN, NSDPOLL_ADD));
}
DBGPRINTF("New session created with NSD %p.\n", pNewSess);
@@ -661,7 +660,7 @@ processWorkset(tcpsrv_t *pThis, nspoll_t *pPoll, int numEntries, nsd_epworkset_t
int origEntries = numEntries;
DEFiRet;
- dbgprintf("tcpsrv: ready to process %d event entries\n", numEntries);
+ DBGPRINTF("tcpsrv: ready to process %d event entries\n", numEntries);
while(numEntries > 0) {
if(glbl.GetGlobalInputTermState() == 1)
@@ -862,21 +861,21 @@ Run(tcpsrv_t *pThis)
}
if(localRet != RS_RET_OK) {
/* fall back to select */
- dbgprintf("tcpsrv could not use epoll() interface, iRet=%d, using select()\n", localRet);
+ DBGPRINTF("tcpsrv could not use epoll() interface, iRet=%d, using select()\n", localRet);
iRet = RunSelect(pThis, workset, sizeof(workset)/sizeof(nsd_epworkset_t));
FINALIZE;
}
- dbgprintf("tcpsrv uses epoll() interface, nsdpoll driver found\n");
+ DBGPRINTF("tcpsrv uses epoll() interface, nsdpoll driver found\n");
/* flag that we are in epoll mode */
pThis->bUsingEPoll = TRUE;
/* Add the TCP listen sockets to the list of sockets to monitor */
for(i = 0 ; i < pThis->iLstnCurr ; ++i) {
- dbgprintf("Trying to add listener %d, pUsr=%p\n", i, pThis->ppLstn);
+ DBGPRINTF("Trying to add listener %d, pUsr=%p\n", i, pThis->ppLstn);
CHKiRet(nspoll.Ctl(pPoll, pThis->ppLstn[i], i, pThis->ppLstn, NSDPOLL_IN, NSDPOLL_ADD));
- dbgprintf("Added listener %d\n", i);
+ DBGPRINTF("Added listener %d\n", i);
}
while(1) {
@@ -1064,7 +1063,7 @@ static rsRetVal
SetKeepAlive(tcpsrv_t *pThis, int iVal)
{
DEFiRet;
- dbgprintf("tcpsrv: keep-alive set to %d\n", iVal);
+ DBGPRINTF("tcpsrv: keep-alive set to %d\n", iVal);
pThis->bUseKeepAlive = iVal;
RETiRet;
}
diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c
index 2657780d..bcded428 100644
--- a/tools/pmrfc3164.c
+++ b/tools/pmrfc3164.c
@@ -79,7 +79,7 @@ BEGINparse
uchar bufParseTAG[CONF_TAG_MAXSIZE];
uchar bufParseHOSTNAME[CONF_HOSTNAME_MAXSIZE];
CODESTARTparse
- dbgprintf("Message will now be parsed by the legacy syslog parser (one size fits all... ;)).\n");
+ DBGPRINTF("Message will now be parsed by the legacy syslog parser (one size fits all... ;)).\n");
assert(pMsg != NULL);
assert(pMsg->pszRawMsg != NULL);
lenMsg = pMsg->iLenRawMsg - pMsg->offAfterPRI; /* note: offAfterPRI is already the number of PRI chars (do not add one!) */
@@ -229,7 +229,7 @@ CODEmodInit_QueryRegCFSLineHdlr
CHKiRet(objUse(parser, CORE_COMPONENT));
CHKiRet(objUse(datetime, CORE_COMPONENT));
- dbgprintf("rfc3164 parser init called\n");
+ DBGPRINTF("rfc3164 parser init called\n");
bParseHOSTNAMEandTAG = glbl.GetParseHOSTNAMEandTAG(); /* cache value, is set only during rsyslogd option processing */