http & tls: fix transaction handling

When http and/or tls logging is disabled, the app layer would still
be flagged as logging. This caused transactions not to be freed until
the end of the flow as the logged tx id would never increment.

This fix postpones the setting of the app layer parser "logger"
flag to the point where we know the logger is enabled.
pull/625/merge
Victor Julien 11 years ago
parent bee5ff172b
commit 36bc8d5cd0

@ -73,9 +73,6 @@ 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) {
@ -790,6 +787,9 @@ OutputCtx *LogHttpLogInitCtx(ConfNode *conf)
SCLogDebug("HTTP log output initialized");
/* enable the logger for the app layer */
AppLayerRegisterLogger(ALPROTO_HTTP);
return output_ctx;
parsererror:

@ -83,9 +83,6 @@ void TmModuleLogTlsLogRegister(void)
OutputRegisterModule(MODULE_NAME, "tls-log", LogTlsLogInitCtx);
/* enable the logger for the app layer */
AppLayerRegisterLogger(ALPROTO_TLS);
SC_ATOMIC_INIT(cert_id);
}
@ -593,6 +590,9 @@ OutputCtx *LogTlsLogInitCtx(ConfNode *conf)
SCLogDebug("TLS log output initialized");
/* enable the logger for the app layer */
AppLayerRegisterLogger(ALPROTO_TLS);
return output_ctx;
tlslog_error:

Loading…
Cancel
Save