app-layer: don't check tx detect flags if detect is disabled

pull/5442/head
Victor Julien 5 years ago
parent 34e83b8acf
commit 2cfa35ccc9

@ -870,6 +870,7 @@ FileContainer *AppLayerParserGetFiles(const Flow *f, const uint8_t direction)
SCReturnPtr(ptr, "FileContainer *");
}
extern int g_detect_disabled;
/**
* \brief remove obsolete (inspected and logged) transactions
*/
@ -882,7 +883,7 @@ void AppLayerParserTransactionsCleanup(Flow *f)
if (unlikely(p->StateTransactionFree == NULL))
SCReturn;
const bool has_tx_detect_flags = (p->GetTxData != NULL);
const bool has_tx_detect_flags = (p->GetTxData != NULL && !g_detect_disabled);
const uint8_t ipproto = f->proto;
const AppProto alproto = f->alproto;
void * const alstate = f->alstate;

Loading…
Cancel
Save