summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-05-29 13:40:04 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2009-05-29 13:40:04 +0200
commit43c45bfebcc672d6fbec2d4d659609d1ea48eda6 (patch)
tree0a8ad82a7e71af7a77cf59b3c58708e915d316bb
parent23dac82b684e966490de707a44144b3ad0ce2323 (diff)
downloadrsyslog-43c45bfebcc672d6fbec2d4d659609d1ea48eda6.tar.gz
rsyslog-43c45bfebcc672d6fbec2d4d659609d1ea48eda6.tar.xz
rsyslog-43c45bfebcc672d6fbec2d4d659609d1ea48eda6.zip
fixed problem in syslog-protocol (now RFC5424) parser
... as well as some other minor issues.
-rw-r--r--ChangeLog4
-rw-r--r--plugins/imdiag/imdiag.c3
-rw-r--r--tools/syslogd.c35
3 files changed, 25 insertions, 17 deletions
diff --git a/ChangeLog b/ChangeLog
index 86ac485f..2269dc05 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+---------------------------------------------------------------------------
+Version 3.22.1 [v3-stable] (rgerhards), 2009-04-??
- bugfix: internal messages were emitted to whatever file had fd2 when
rsyslogd ran in forked mode (as usual!)
Thanks to varmojfekoj for the patch
@@ -7,8 +9,6 @@
the change requires more code than I had hoped. Thus I have NOT tried
to actually catch all cases, this is left for the current devel
releases, if necessary]
----------------------------------------------------------------------------
-Version 3.22.1 [v3-stable] (rgerhards), 2009-04-??
- bugfix: light and full delay watermarks had invalid values, badly
affecting performance for delayable inputs
- bugfix: potential segfault issue when multiple $UDPServerRun directives
diff --git a/plugins/imdiag/imdiag.c b/plugins/imdiag/imdiag.c
index 3cd2dcf8..77e99236 100644
--- a/plugins/imdiag/imdiag.c
+++ b/plugins/imdiag/imdiag.c
@@ -1,3 +1,5 @@
+#warning "imdiag is NOT supported in this version of rsyslog"
+#if 0
/* imdiag.c
* This is a diagnostics module, primarily meant for troubleshooting
* and information about the runtime state of rsyslog. It is implemented
@@ -191,6 +193,7 @@ CODEmodInit_QueryRegCFSLineHdlr
resetConfigVariables, NULL, STD_LOADABLE_MODULE_ID));
#endif
ENDmodInit
+#endif
/* vim:set ai:
diff --git a/tools/syslogd.c b/tools/syslogd.c
index 01d3af71..f8149613 100644
--- a/tools/syslogd.c
+++ b/tools/syslogd.c
@@ -1252,21 +1252,26 @@ static int parseRFCStructuredData(char **pp2parse, char *pResult)
if(*p2parse != '[')
return 1; /* this is NOT structured data! */
- while(bCont) {
- if(*p2parse == '\0') {
- iRet = 1; /* this is not valid! */
- bCont = 0;
- } else if(*p2parse == '\\' && *(p2parse+1) == ']') {
- /* this is escaped, need to copy both */
- *pResult++ = *p2parse++;
- *pResult++ = *p2parse++;
- } else if(*p2parse == ']' && *(p2parse+1) == ' ') {
- /* found end, just need to copy the ] and eat the SP */
- *pResult++ = *p2parse;
- p2parse += 2;
- bCont = 0;
- } else {
- *pResult++ = *p2parse++;
+ if(*p2parse != '-') { /* empty structured data? */
+ *pResult++ = '-';
+ ++p2parse;
+ } else {
+ while(bCont) {
+ if(*p2parse == '\0') {
+ iRet = 1; /* this is not valid! */
+ bCont = 0;
+ } else if(*p2parse == '\\' && *(p2parse+1) == ']') {
+ /* this is escaped, need to copy both */
+ *pResult++ = *p2parse++;
+ *pResult++ = *p2parse++;
+ } else if(*p2parse == ']' && *(p2parse+1) == ' ') {
+ /* found end, just need to copy the ] and eat the SP */
+ *pResult++ = *p2parse;
+ p2parse += 2;
+ bCont = 0;
+ } else {
+ *pResult++ = *p2parse++;
+ }
}
}