}
if (SCConfLogOpenRedis(redis_node, json_ctx->file_ctx) < 0) {
- SCFree(json_ctx->file_ctx->sensor_name);
LogFileFreeCtx(json_ctx->file_ctx);
SCFree(json_ctx);
SCFree(output_ctx);
/* vi: set et ts=4: */
-/* Copyright (C) 2007-2016 Open Information Security Foundation
+/* Copyright (C) 2007-2021 Open Information Security Foundation
*
* You can copy, redistribute or modify this Program under the terms of
* the GNU General Public License version 2 as published by the Free
#endif /* HAVE_LIBEVENT_PTHREADS */
}
-/** \brief SCLogRedisContextAlloc() - Allocates and initalizes redis context
+/** \brief SCLogRedisContextAlloc() - Allocates and initializes redis context
*/
static SCLogRedisContext *SCLogRedisContextAlloc(void)
{
* \param log_ctx Log file context allocated by caller
* \param string buffer with data to write
* \param string_len data length
- * \retval 0 on sucess;
+ * \retval 0 on success;
* \retval -1 on failure;
*/
int LogFileWriteRedis(void *lf_ctx, const char *string, size_t string_len)
{
LogFileCtx *log_ctx = lf_ctx;
+ if (log_ctx->threaded) {
+ FatalError(SC_ERR_FATAL, "redis does not support threaded output");
+ }
+
const char *redis_port = NULL;
const char *redis_mode = NULL;