summaryrefslogtreecommitdiff
path: root/omfile.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2008-03-29 12:15:02 +0100
committerMichael Biebl <biebl@debian.org>2008-03-29 12:15:02 +0100
commit44dd4512fef92b75209fffd59795bb6f0957bb8f (patch)
treeeefc545552ab0270a0b662474c8bb810cbc0496a /omfile.c
parentb45bd5ba02d50cea176040a3d86848ef1f13c763 (diff)
downloadrsyslog-44dd4512fef92b75209fffd59795bb6f0957bb8f.tar.gz
Imported Upstream version 2.0.1upstream/2.0.1
Diffstat (limited to 'omfile.c')
-rw-r--r--omfile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/omfile.c b/omfile.c
index 3691d98..cd5e23c 100644
--- a/omfile.c
+++ b/omfile.c
@@ -357,6 +357,7 @@ static void prepareFile(instanceData *pData, uchar *newFileName)
pData->fd = open((char*) newFileName, O_WRONLY|O_APPEND|O_CREAT|O_NOCTTY,
pData->fCreateMode);
} else {
+ pData->fd = -1;
/* file does not exist, create it (and eventually parent directories */
if(pData->bCreateDirs) {
/* we fist need to create parent dirs if they are missing
@@ -596,6 +597,7 @@ again:
BEGINcreateInstance
CODESTARTcreateInstance
+ pData->fd = -1;
ENDcreateInstance