summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-09-12 15:11:38 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2008-09-12 15:11:38 +0200
commit63994d092c3567030b96d28dbdc3db5f0e22fba2 (patch)
tree42d94ec95dc0231b0a8a86c52fd9605e524e6b09 /tools
parent2082d963975a88c8e4dee3a43b98d939f9a2323f (diff)
parentc04f196e25d63a7f45bf2ad79b48019fed98e5c9 (diff)
downloadrsyslog-63994d092c3567030b96d28dbdc3db5f0e22fba2.tar.gz
rsyslog-63994d092c3567030b96d28dbdc3db5f0e22fba2.tar.xz
rsyslog-63994d092c3567030b96d28dbdc3db5f0e22fba2.zip
Merge branch 'v3-stable' into beta
Conflicts: runtime/datetime.h runtime/rsyslog.h
Diffstat (limited to 'tools')
-rw-r--r--tools/syslogd.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c
index e432a67d..439ca303 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -372,7 +372,7 @@ static rsRetVal resetConfigVariables(uchar __attribute__((unused)) *pp, void __a
iMainMsgQHighWtrMark = 8000;
iMainMsgQLowWtrMark = 2000;
iMainMsgQDiscardMark = 9800;
- iMainMsgQDiscardSeverity = 4;
+ iMainMsgQDiscardSeverity = 8;
iMainMsgQueMaxFileSize = 1024 * 1024;
iMainMsgQueueNumWorkers = 1;
iMainMsgQPersistUpdCnt = 0;
@@ -1394,13 +1394,18 @@ static int parseLegacySyslogMsg(msg_t *pMsg, int flags)
*/
if(datetime.ParseTIMESTAMP3339(&(pMsg->tTIMESTAMP), &p2parse) == TRUE) {
/* we are done - parse pointer is moved by ParseTIMESTAMP3339 */;
- } else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), p2parse) == TRUE) {
- p2parse += 16;
+ } else if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse) == TRUE) {
+ /* we are done - parse pointer is moved by ParseTIMESTAMP3164 */;
} else if(*p2parse == ' ') { /* try to see if it is slighly malformed - HP procurve seems to do that sometimes */
- if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), p2parse+1) == TRUE) {
+ ++p2parse; /* move over space */
+ if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &p2parse) == TRUE) {
/* indeed, we got it! */
- p2parse += 17;
+ /* we are done - parse pointer is moved by ParseTIMESTAMP3164 */;
} else {
+ /* parse pointer needs to be restored, as we moved it off-by-one
+ * for this try.
+ */
+ --p2parse;
flags |= ADDDATE;
}
} else {
@@ -3003,7 +3008,7 @@ int realMain(int argc, char **argv)
* only when actually neeeded.
* rgerhards, 2008-04-04
*/
- while ((ch = getopt(argc, argv, "46aAc:def:g:hi:l:m:M:nopqQr::s:t:u:vwx")) != EOF) {
+ while ((ch = getopt(argc, argv, "46a:Ac:def:g:hi:l:m:M:nopqQr::s:t:u:vwx")) != EOF) {
switch((char)ch) {
case '4':
case '6':