The file size returned by FileSize is invalid if file store is not
used so we introduce a new size field in File structure that is used
to store the size.
SCReturnInt(-1);
}
+ ffc->tail->size += data_len;
+
if (ffc->tail->state != FILE_STATE_OPENED) {
if (ffc->tail->flags & FILE_NOSTORE) {
SCReturnInt(-2);
FileContainerAdd(ffc, ff);
if (data != NULL) {
+ ff->size += data_len;
if (AppendData(ff, data, data_len) != 0) {
ff->state = FILE_STATE_ERROR;
SCReturnPtr(NULL, "File");
}
if (data != NULL) {
+ ff->size += data_len;
if (ff->flags & FILE_NOSTORE) {
#ifdef HAVE_NSS
/* no storage but hashing */
uint64_t content_inspected; /**< used in pruning if FILE_USE_DETECT
* flag is set */
uint64_t content_stored;
+ uint64_t size;
} File;
typedef struct FileContainer_ {