fix compile errors w/o libjansson

pull/802/head
Tom DeCanio 12 years ago committed by Victor Julien
parent 8adbc741ba
commit 3bc95c9258

@ -43,6 +43,7 @@
#include "detect-engine.h"
#include "detect-engine-mpm.h"
#include "detect-reference.h"
#include "app-layer-parser.h"
#include "util-classification-config.h"
#include "util-syslog.h"
@ -61,8 +62,8 @@
#include "alert-json.h"
/*#undef HAVE_LIBJANSSON for testing without messing with config */
#ifndef HAVE_LIBJANSSON
/** Handle the case where no JSON support is compiled in.
*
*/
@ -79,12 +80,7 @@ void TmModuleAlertJsonRegister (void) {
tmm_modules[TMM_OUTPUTJSON].Func = AlertJson;
tmm_modules[TMM_OUTPUTJSON].ThreadDeinit = AlertJsonThreadDeinit;
tmm_modules[TMM_OUTPUTJSON].RegisterTests = AlertJsonRegisterTests;
/* enable the logger for the app layer */
AppLayerRegisterLogger(ALPROTO_DNS_UDP);
AppLayerRegisterLogger(ALPROTO_DNS_TCP);
AppLayerRegisterLogger(ALPROTO_HTTP);
}
OutputCtx *AlertJsonInitCtx(ConfNode *conf)
{
@ -108,7 +104,8 @@ TmEcode AlertJsonThreadDeinit(ThreadVars *t, void *data)
return TM_ECODE_FAILED;
}
void AlertJsonRegisterTests (void) {
void AlertJsonRegisterTests (void)
{
}
#else /* implied we do have JSON support */
@ -147,6 +144,12 @@ void TmModuleAlertJsonRegister (void) {
tmm_modules[TMM_OUTPUTJSON].cap_flags = 0;
OutputRegisterModule(MODULE_NAME, "eve-log", AlertJsonInitCtx);
/* enable the logger for the app layer */
AppLayerRegisterLogger(ALPROTO_DNS_UDP);
AppLayerRegisterLogger(ALPROTO_DNS_TCP);
AppLayerRegisterLogger(ALPROTO_HTTP);
AppLayerRegisterLogger(ALPROTO_TLS);
}
/* Default Sensor ID value */
@ -753,7 +756,6 @@ void AlertJsonRegisterTests(void)
#ifdef UNITTESTS
#endif /* UNITTESTS */
}

@ -24,10 +24,13 @@
#ifndef __ALERT_JSON_H__
#define __ALERT_JSON_H__
void TmModuleAlertJsonRegister (void);
#ifdef HAVE_LIBJANSSON
json_t *CreateJSONHeader(Packet *p, int direction_sensative);
TmEcode OutputJSON(json_t *js, void *data, uint64_t *count);
void TmModuleAlertJsonRegister (void);
void TmModuleAlertJsonIPv4Register (void);
void TmModuleAlertJsonPv6Register (void);
OutputCtx *AlertJsonInitCtx(ConfNode *);
@ -57,5 +60,7 @@ typedef struct AlertJsonThread_ {
OutputCtx *tls_ctx;
} AlertJsonThread;
#endif /* HAVE_LIBJANSSON */
#endif /* __ALERT_JSON_H__ */

Loading…
Cancel
Save