From: Eric Leblond Date: Wed, 27 May 2015 12:01:36 +0000 (+0200) Subject: file-json: add file_id to message X-Git-Tag: suricata-3.0RC1~246 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cd97713c2945a1e55ea6e3b8df804ab3f06fca4;p=thirdparty%2Fsuricata.git 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. --- 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));