From 5abc990a6a2178bbc730a43bd0ee9b433abc8303 Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Thu, 24 Jan 2008 07:27:08 +0000 Subject: fixed a bug that caused a potential hang in file and fwd output module varmojfekoj provided the patch - many thanks! --- omfile.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'omfile.c') diff --git a/omfile.c b/omfile.c index 3691d981..cd5e23c4 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 -- cgit