From cd5253fa82fdbd7529f76c9cec2130e1ccb210bb Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 7 Oct 2011 11:42:49 +0200 Subject: bugfix: imfile did invalid system call under some circumstances when a file that was to be monitored did not exist BUT the state file actually existed. Mostly a cosmetic issue. Root cause was incomplete error checking in stream.c; so patch may affect other code areas. --- plugins/imfile/imfile.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'plugins/imfile/imfile.c') diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c index cac3a55d..40a41a98 100644 --- a/plugins/imfile/imfile.c +++ b/plugins/imfile/imfile.c @@ -147,10 +147,10 @@ openFile(fileInfo_t *pThis) /* check if the file exists */ if(stat((char*) pszSFNam, &stat_buf) == -1) { if(errno == ENOENT) { - /* currently no object! dbgoprint((obj_t*) pThis, "clean startup, no .si file found\n"); */ + dbgprintf("filemon %p: clean startup, no .si file found\n", pThis); ABORT_FINALIZE(RS_RET_FILE_NOT_FOUND); } else { - /* currently no object! dbgoprint((obj_t*) pThis, "error %d trying to access .si file\n", errno); */ + dbgprintf("filemon %p: error %d trying to access .si file\n", pThis, errno); ABORT_FINALIZE(RS_RET_IO_ERROR); } } -- cgit v1.2.3