From bff8ae299fce6844483a6fa5de161dbc68835d58 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Fri, 18 Sep 2009 09:23:01 +0200 Subject: [PATCH] Fix pcap file mode --- src/runmodes.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/runmodes.c b/src/runmodes.c index c5785eedb5..a3a76d5ace 100644 --- a/src/runmodes.c +++ b/src/runmodes.c @@ -1140,12 +1140,17 @@ int RunModeFilePcap(DetectEngineCtx *de_ctx, char *file) { } ThreadVars *tv_unified2 = TmThreadCreatePacketHandler("Unified2Alert","alert-queue3","simple","alert-queue4","simple","1slot"); + if (tv_unified2 == NULL) { + printf("ERROR: TmThreadsCreate failed\n"); + exit(EXIT_FAILURE); + } + tm_module = TmModuleGetByName("Unified2Alert"); if (tm_module == NULL) { printf("ERROR: TmModuleGetByName for Unified2Alert failed\n"); exit(EXIT_FAILURE); } - TmVarSlotSetFuncAppend(tv_unified2,tm_module,NULL); + Tm1SlotSetFunc(tv_unified2,tm_module,NULL); if (TmThreadSpawn(tv_unified2) != 0) { printf("ERROR: TmThreadSpawn failed\n");