From: Maurizio Abba Date: Mon, 16 Nov 2015 12:21:27 +0000 (+0000) Subject: filestore-call: forcing a call to FileStore instead of manually updating X-Git-Tag: suricata-3.0.1RC1~161 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4fb6217ee72969ef59b60ff7f4a0f6bfeaa8c9b;p=thirdparty%2Fsuricata.git filestore-call: forcing a call to FileStore instead of manually updating the relative flag in order to have a single point where we actually touch the File structure --- diff --git a/src/util-file.c b/src/util-file.c index 66d4080e66..16a7bd40fe 100644 --- a/src/util-file.c +++ b/src/util-file.c @@ -535,7 +535,7 @@ File *FileOpenFile(FileContainer *ffc, uint8_t *name, } if (flags & FILE_STORE) { - ff->flags |= FILE_STORE; + FileStore(ff); } else if (flags & FILE_NOSTORE) { SCLogDebug("not storing this file"); ff->flags |= FILE_NOSTORE; @@ -882,7 +882,7 @@ void FileStoreFileById(FileContainer *fc, uint32_t file_id) if (fc != NULL) { for (ptr = fc->head; ptr != NULL; ptr = ptr->next) { if (ptr->file_id == file_id) { - ptr->flags |= FILE_STORE; + FileStore(ptr); } } } @@ -897,7 +897,7 @@ void FileStoreAllFilesForTx(FileContainer *fc, uint64_t tx_id) if (fc != NULL) { for (ptr = fc->head; ptr != NULL; ptr = ptr->next) { if (ptr->txid == tx_id) { - ptr->flags |= FILE_STORE; + FileStore(ptr); } } } @@ -911,7 +911,7 @@ void FileStoreAllFiles(FileContainer *fc) if (fc != NULL) { for (ptr = fc->head; ptr != NULL; ptr = ptr->next) { - ptr->flags |= FILE_STORE; + FileStore(ptr); } } }