summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarius Tomaschewski <mt@suse.de>2012-10-17 11:29:45 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-10-17 14:46:35 +0200
commit49a5c0c3b9dbb91e3cdd97b2975a3e12c53fe73e (patch)
tree4a33432acf783681963831b2ea52940f3be49396
parent6ed28016ca1a98f183f72d1d381a5027949ca965 (diff)
downloadrsyslog-49a5c0c3b9dbb91e3cdd97b2975a3e12c53fe73e.tar.gz
rsyslog-49a5c0c3b9dbb91e3cdd97b2975a3e12c53fe73e.tar.xz
rsyslog-49a5c0c3b9dbb91e3cdd97b2975a3e12c53fe73e.zip
imklog: skip leading spaces in kernel timestamp
-rw-r--r--plugins/imklog/bsd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/imklog/bsd.c b/plugins/imklog/bsd.c
index eaf8e5ca..428d3cc2 100644
--- a/plugins/imklog/bsd.c
+++ b/plugins/imklog/bsd.c
@@ -92,7 +92,9 @@ submitSyslog(int pri, uchar *buf)
/* we now try to parse the timestamp. iff it parses, we assume
* it is a timestamp. Otherwise we know for sure it is no ts ;)
*/
- i = 4; /* first digit after '[' */
+ i = 4; /* space or first digit after '[' */
+ while(buf[i] && isspace(buf[i]))
+ ++i; /* skip space */
secs = 0;
while(buf[i] && isdigit(buf[i])) {
secs = secs * 10 + buf[i] - '0';