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" #include "util-print.h"
#ifdef PROFILING #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) 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; int fast_pattern_chop_set = 0;
@ -133,4 +134,5 @@ void RulesDumpMatchArray(const DetectEngineThreadCtx *det_ctx, const Packet *p)
json_object_clear(js); json_object_clear(js);
json_decref(js); json_decref(js);
} }
#endif /* HAVE_LIBJANSSON */
#endif /* PROFILING */ #endif /* PROFILING */

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

Loading…
Cancel
Save