profiling: fix compilation if libjansson is missing

pull/2124/head
Victor Julien 9 years ago
parent 661d7c1d09
commit 4b9a62d1fe

@ -32,6 +32,7 @@
#include "util-print.h"
#ifdef PROFILING
#ifdef HAVE_LIBJANSSON
static void DumpFp(const SigMatch *sm, char *pat_orig, uint32_t pat_orig_sz, char *pat_chop, uint32_t pat_chop_sz)
{
int fast_pattern_chop_set = 0;
@ -133,4 +134,5 @@ void RulesDumpMatchArray(const DetectEngineThreadCtx *det_ctx, const Packet *p)
json_object_clear(js);
json_decref(js);
}
#endif /* HAVE_LIBJANSSON */
#endif /* PROFILING */

@ -1516,8 +1516,10 @@ int SigMatchSignatures(ThreadVars *th_v, DetectEngineCtx *de_ctx, DetectEngineTh
SGH_PROFILING_RECORD(det_ctx, det_ctx->sgh);
#ifdef PROFILING
#ifdef HAVE_LIBJANSSON
if (match_cnt >= de_ctx->profile_match_logging_threshold)
RulesDumpMatchArray(det_ctx, p);
#endif
#endif
uint32_t sflags, next_sflags = 0;

Loading…
Cancel
Save