diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2011-09-26 12:48:57 +0200 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2011-09-26 12:48:57 +0200 |
commit | f2528ec101eb660560c7ec327d440cbb17f04f14 (patch) | |
tree | 05083efcd96dedc9387579caa17c81b8b78592c6 /plugins/imuxsock | |
parent | ceb336f0398e37ab51b4b54a14fa394d53ccdf3f (diff) | |
parent | 0c7604dc27119122a3022c7bf094ffb5f8d59e6d (diff) | |
download | rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.tar.gz rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.tar.bz2 rsyslog-f2528ec101eb660560c7ec327d440cbb17f04f14.zip |
Merge branch 'v5-devel'
Conflicts:
ChangeLog
configure.ac
doc/manual.html
runtime/conf.c
tools/omfile.c
tools/omusrmsg.c
Diffstat (limited to 'plugins/imuxsock')
-rw-r--r-- | plugins/imuxsock/imuxsock.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/imuxsock/imuxsock.c b/plugins/imuxsock/imuxsock.c index f5330146..cf4211e7 100644 --- a/plugins/imuxsock/imuxsock.c +++ b/plugins/imuxsock/imuxsock.c @@ -442,7 +442,7 @@ createLogSocket(lstn_t *pLstn) pLstn->fd = socket(AF_UNIX, SOCK_DGRAM, 0); if(pLstn->fd < 0 || bind(pLstn->fd, (struct sockaddr *) &sunx, SUN_LEN(&sunx)) < 0 || chmod((char*)pLstn->sockName, 0666) < 0) { - errmsg.LogError(errno, NO_ERRCODE, "connot create '%s'", pLstn->sockName); + errmsg.LogError(errno, NO_ERRCODE, "cannot create '%s'", pLstn->sockName); dbgprintf("cannot create %s (%d).\n", pLstn->sockName, errno); close(pLstn->fd); pLstn->fd = -1; @@ -662,8 +662,13 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim parse++; lenMsg--; /* '>' */ if(ts == NULL) { - if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) { - DBGPRINTF("we have a problem, invalid timestamp in msg!\n"); + if((pLstn->flags & IGNDATE)) { + parse += 16; /* just skip timestamp */ + lenMsg -= 16; + } else { + if(datetime.ParseTIMESTAMP3164(&(pMsg->tTIMESTAMP), &parse, &lenMsg) != RS_RET_OK) { + DBGPRINTF("we have a problem, invalid timestamp in msg!\n"); + } } } else { /* if we pulled the time from the system, we need to update the message text */ if(lenMsg >= 16) { @@ -686,7 +691,7 @@ SubmitMsg(uchar *pRcv, int lenRcv, lstn_t *pLstn, struct ucred *cred, struct tim /* pull tag */ i = 0; - while(lenMsg > 0 && *parse != ' ' && i < CONF_TAG_MAXSIZE) { + while(lenMsg > 0 && *parse != ' ' && i < CONF_TAG_MAXSIZE - 1) { bufParseTAG[i++] = *parse++; --lenMsg; } |