tx logging: fix potential missed logging issue

Wrong scope of proto_logged variable could potentially lead to
incrementing logged tx id w/o actually being logged.

Reported-By: Jason Ish
pull/1966/head
Victor Julien 9 years ago
parent 400fa5b9e5
commit a866d5d915

@ -125,10 +125,10 @@ static TmEcode OutputTxLog(ThreadVars *tv, Packet *p, void *thread_data, PacketQ
int tx_progress_done_value_tc =
AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto,
STREAM_TOCLIENT);
int proto_logged = 0;
for (; tx_id < total_txs; tx_id++)
{
int proto_logged = 0;
void *tx = AppLayerParserGetTx(p->proto, alproto, alstate, tx_id);
if (tx == NULL) {
SCLogDebug("tx is NULL not logging");

Loading…
Cancel
Save