log/file: Ensure file ctx pointer is returned .

The fix for issue 7447 introduced an error with threaded eve output.

The changes that were committed for that issue mishandled the return
value when a file is being opened for the 2nd or higher time.

Instead of returning the existing file context, null was returned.
pull/12375/head
Jeff Lucovsky 2 months ago
parent ad7ff1c91b
commit 1d996c5aed

@ -737,6 +737,8 @@ LogFileCtx *LogFileEnsureExists(ThreadId thread_id, LogFileCtx *parent_ctx)
"Unable to open slot %d for file %s", entry->slot_number, parent_ctx->filename);
(void)HashTableRemove(parent_ctx->threads->ht, entry, 0);
}
} else {
ret_ctx = entry->ctx;
}
SCMutexUnlock(&parent_ctx->threads->mutex);

Loading…
Cancel
Save