From 1cd97713c2945a1e55ea6e3b8df804ab3f06fca4 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Wed, 27 May 2015 14:01:36 +0200 Subject: [PATCH] file-json: add file_id to message This will allow to get the filename and by consequence the file after a parsing of the EVEV log file. --- src/output-json-file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/output-json-file.c b/src/output-json-file.c index 5464088f16..cbfa0c4d0b 100644 --- a/src/output-json-file.c +++ b/src/output-json-file.c @@ -242,6 +242,9 @@ static void FileWriteJsonRecord(JsonFileLogThread *aft, const Packet *p, const F } json_object_set_new(fjs, "stored", (ff->flags & FILE_STORED) ? json_true() : json_false()); + if (ff->flags & FILE_STORED) { + json_object_set_new(fjs, "file_id", json_integer(ff->file_id)); + } json_object_set_new(fjs, "size", json_integer(ff->size)); json_object_set_new(fjs, "tx_id", json_integer(ff->txid)); -- 2.47.2