summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2009-11-05 12:44:57 +0100
committerRainer Gerhards <rgerhards@adiscon.com>2009-11-05 12:44:57 +0100
commita5cd509be736fcff3c8ae3104712d2fe85776416 (patch)
treedde68f6af795daeb9409bfbd6b6bb4ff8fe6ba6d
parent037576dcc79bb93b78ec8d91305fa605f8bf7a3d (diff)
downloadrsyslog-a5cd509be736fcff3c8ae3104712d2fe85776416.tar.gz
rsyslog-a5cd509be736fcff3c8ae3104712d2fe85776416.tar.xz
rsyslog-a5cd509be736fcff3c8ae3104712d2fe85776416.zip
bugfix: named pipes did no longer work (they always got an open error)
this was a regression from the omfile rewrite in 4.5.0
-rw-r--r--ChangeLog4
-rw-r--r--runtime/stream.c1
-rw-r--r--tools/omfile.c7
3 files changed, 10 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index ef3e9a52..a1e82ff3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
---------------------------------------------------------------------------
Version 4.5.6 [v4-beta] (rgerhards), 2009-09-??
+- bugfix: named pipes did no longer work (they always got an open error)
+ this was a regression from the omfile rewrite in 4.5.0
- bugfix(minor): diag function returned wrong queue memeber count
for the main queue if an active DA queue existed. This had no relevance
to real deployments (assuming they are not running the debug/diagnostic
@@ -133,6 +135,8 @@ Version 4.5.0 [DEVEL] (rgerhards), 2009-07-02
removes false positives (but may cause some trouble with hostname
parsing). For details, see this bug tracker:
http://bugzilla.adiscon.com/show_bug.cgi?id=126
+- omfile rewrite to natively support zip files (includes large extension
+ of the stream class)
- added configuration commands (see doc for explanations)
* $OMFileZipLevel
* $OMFileIOBufferSize
diff --git a/runtime/stream.c b/runtime/stream.c
index ac90df28..2d1e9380 100644
--- a/runtime/stream.c
+++ b/runtime/stream.c
@@ -211,6 +211,7 @@ doPhysOpen(strm_t *pThis)
}
pThis->fd = open((char*)pThis->pszCurrFName, iFlags, pThis->tOpenMode);
+ DBGPRINTF("file '%s' opened as #%d with mode %d\n", pThis->pszCurrFName, pThis->fd, pThis->tOpenMode);
if(pThis->fd == -1) {
int ierrnoSave = errno;
dbgoprint((obj_t*) pThis, "open error %d, file '%s'\n", errno, pThis->pszCurrFName);
diff --git a/tools/omfile.c b/tools/omfile.c
index 9d6b3d1d..bea94e99 100644
--- a/tools/omfile.c
+++ b/tools/omfile.c
@@ -1,8 +1,6 @@
/* omfile.c
* This is the implementation of the build-in file output module.
*
- * Handles: eTypeCONSOLE, eTypeTTY, eTypeFILE, eTypePIPE
- *
* NOTE: read comments in module-template.h to understand how this file
* works!
*
@@ -667,6 +665,11 @@ CODESTARTparseSelectorAct
case '|':
case '/':
CODE_STD_STRING_REQUESTparseSelectorAct(1)
+ /* we now have the same semantics for files and pipes, but we need to skip over
+ * the pipe indicator traditionally seen in config files...
+ */
+ if(*p == '|')
+ ++p;
CHKiRet(cflineParseFileName(p, (uchar*) pData->f_fname, *ppOMSR, 0, OMSR_NO_RQD_TPL_OPTS,
(pszTplName == NULL) ? (uchar*)"RSYSLOG_FileFormat" : pszTplName));
pData->bDynamicName = 0;