From 7066a79c10a6445127785088016a9068b3a4c4dc Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 18 Jan 2012 12:47:30 +0100 Subject: [PATCH] Register HTTP logger at registration, not thread init. --- src/log-httplog.c | 6 +++--- src/threads.h | 2 +- suricata.yaml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/log-httplog.c b/src/log-httplog.c index 676a3e67e0..1f5fc56daa 100644 --- a/src/log-httplog.c +++ b/src/log-httplog.c @@ -70,6 +70,9 @@ void TmModuleLogHttpLogRegister (void) { tmm_modules[TMM_LOGHTTPLOG].cap_flags = 0; OutputRegisterModule(MODULE_NAME, "http-log", LogHttpLogInitCtx); + + /* enable the logger for the app layer */ + AppLayerRegisterLogger(ALPROTO_HTTP); } void TmModuleLogHttpLogIPv4Register (void) { @@ -367,9 +370,6 @@ TmEcode LogHttpLogThreadInit(ThreadVars *t, void *initdata, void **data) /* Use the Ouptut Context (file pointer and mutex) */ aft->httplog_ctx= ((OutputCtx *)initdata)->data; - /* enable the logger for the app layer */ - AppLayerRegisterLogger(ALPROTO_HTTP); - *data = (void *)aft; return TM_ECODE_OK; } diff --git a/src/threads.h b/src/threads.h index 1ce2aad743..a1e58653d9 100644 --- a/src/threads.h +++ b/src/threads.h @@ -258,7 +258,7 @@ enum { #define SCSpinlock pthread_spinlock_t /** If posix spin not supported, use mutex */ -#if ((_POSIX_SPIN_LOCKS - 200112L) < 0L) +#if ((_POSIX_SPIN_LOCKS - 200112L) < 0L) || defined HELGRIND #define pthread_spinlock_t pthread_mutex_t #define pthread_spin_init(target,arg) SCMutexInit(target, NULL) #define pthread_spin_lock(spin) SCMutexLock(spin) diff --git a/suricata.yaml b/suricata.yaml index 39af96b8ed..7b354005ad 100644 --- a/suricata.yaml +++ b/suricata.yaml @@ -266,7 +266,7 @@ pcre: # If the argument specified is 0, the engine uses an internally defined # default limit. On not specifying a value, we use no limits on the recursion. detect-engine: - - profile: medium + - profile: low - custom-values: toclient_src_groups: 2 toclient_dst_groups: 2 @@ -276,7 +276,7 @@ detect-engine: toserver_dst_groups: 4 toserver_sp_groups: 2 toserver_dp_groups: 25 - - sgh-mpm-context: auto + - sgh-mpm-context: single - inspection-recursion-limit: 3000 # Suricata is multi-threaded. Here the threading can be influenced. @@ -381,7 +381,7 @@ cuda: # compiled with --enable-cuda: b2g_cuda. Make sure to update your # max-pending-packets setting above as well if you use b2g_cuda. -mpm-algo: ac +mpm-algo: ac-gfbs # The memory settings for hash size of these algorithms can vary from lowest # (2048) - low (4096) - medium (8192) - high (16384) - higher (32768) - max