summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndre Lorbach <alorbach@adiscon.com>2011-08-12 14:48:43 +0200
committerAndre Lorbach <alorbach@adiscon.com>2011-08-12 14:48:43 +0200
commit169791752520693d3c81568037bfa319e5081819 (patch)
tree9bd1275163017c425deba1f6eb6b006d50c254a6
parentb4d4366986b464ae4a75594ab7df0a5edb2ee08f (diff)
downloadrsyslog-169791752520693d3c81568037bfa319e5081819.tar.gz
rsyslog-169791752520693d3c81568037bfa319e5081819.tar.xz
rsyslog-169791752520693d3c81568037bfa319e5081819.zip
Added debug output into message parsers needed for bugtracking
Changed version to 5.8.5-pre1
-rw-r--r--configure.ac2
-rw-r--r--runtime/msg.c5
-rw-r--r--tools/pmrfc3164.c2
3 files changed, 8 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac
index 2706ec06..7ed85851 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2,7 +2,7 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.61)
-AC_INIT([rsyslog],[5.8.4],[rsyslog@lists.adiscon.com])
+AC_INIT([rsyslog],[5.8.5-pre1],[rsyslog@lists.adiscon.com])
AM_INIT_AUTOMAKE
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
diff --git a/runtime/msg.c b/runtime/msg.c
index b18fb530..f1de8130 100644
--- a/runtime/msg.c
+++ b/runtime/msg.c
@@ -1661,6 +1661,8 @@ void MsgSetTAG(msg_t *pMsg, uchar* pszBuf, size_t lenBuf)
uchar *pBuf;
assert(pMsg != NULL);
+dbgprintf("MsgSetTAG in: len %d, pszBuf: %s\n", lenBuf, pszBuf);
+
freeTAG(pMsg);
pMsg->iLenTAG = lenBuf;
@@ -1679,6 +1681,8 @@ void MsgSetTAG(msg_t *pMsg, uchar* pszBuf, size_t lenBuf)
memcpy(pBuf, pszBuf, pMsg->iLenTAG);
pBuf[pMsg->iLenTAG] = '\0'; /* this also works with truncation! */
+
+dbgprintf("MsgSetTAG exit: pMsg->iLenTAG %d, pMsg->TAG.szBuf: %s\n", pMsg->iLenTAG, pMsg->TAG.szBuf);
}
@@ -1737,6 +1741,7 @@ getTAG(msg_t *pM, uchar **ppBuf, int *piLen)
*piLen = pM->iLenTAG;
}
}
+dbgprintf("getTAG: len %d, buf '%s'\n", *piLen, *ppBuf);
}
diff --git a/tools/pmrfc3164.c b/tools/pmrfc3164.c
index 635ca985..d56e53f0 100644
--- a/tools/pmrfc3164.c
+++ b/tools/pmrfc3164.c
@@ -176,6 +176,7 @@ CODESTARTparse
* in RFC3164...). We now receive the full size, but will modify the
* outputs so that only 32 characters max are used by default.
*/
+dbgprintf("pmrfc3164:tag:in: lenMsg %d, p2parse: '%s'\n", lenMsg, p2parse);
i = 0;
while(lenMsg > 0 && *p2parse != ':' && *p2parse != ' ' && i < CONF_TAG_MAXSIZE) {
bufParseTAG[i++] = *p2parse++;
@@ -191,6 +192,7 @@ CODESTARTparse
* is considered OK. So we do not need to check for empty TAG. -- rgerhards, 2009-06-23
*/
bufParseTAG[i] = '\0'; /* terminate string */
+dbgprintf("pmrfc3164:tag:done: lenMsg %d, i %d, bufParseTAG: '%s'\n", lenMsg, i, bufParseTAG);
MsgSetTAG(pMsg, bufParseTAG, i);
} else {/* we enter this code area when the user has instructed rsyslog NOT
* to parse HOSTNAME and TAG - rgerhards, 2006-03-13