HtpState *s = f->alstate;
if (s != NULL && s->conn != NULL) {
int tx_progress_done_value_ts =
- AppLayerParserGetStateProgressCompletionStatus(IPPROTO_TCP, ALPROTO_HTTP, 0);
+ AppLayerParserGetStateProgressCompletionStatus(IPPROTO_TCP,
+ ALPROTO_HTTP, STREAM_TOSERVER);
int tx_progress_done_value_tc =
- AppLayerParserGetStateProgressCompletionStatus(IPPROTO_TCP, ALPROTO_HTTP, 1);
+ AppLayerParserGetStateProgressCompletionStatus(IPPROTO_TCP,
+ ALPROTO_HTTP, STREAM_TOCLIENT);
// for each tx
uint64_t tx_id = 0;
int tx_done = 0;
int tx_logged = 0;
- int tx_progress_ts = AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, 0);
+ int tx_progress_ts = AppLayerParserGetStateProgress(
+ IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOSERVER);
if (tx_progress_ts >= tx_progress_done_value_ts) {
- int tx_progress_tc = AppLayerParserGetStateProgress(IPPROTO_TCP, ALPROTO_HTTP, tx, 1);
+ int tx_progress_tc = AppLayerParserGetStateProgress(
+ IPPROTO_TCP, ALPROTO_HTTP, tx, STREAM_TOCLIENT);
if (tx_progress_tc >= tx_progress_done_value_tc) {
tx_done = 1;
}
Flow * const f = p->flow;
FLOWLOCK_WRLOCK(f); /* WRITE lock before we updated flow logged id */
- AppProto alproto = f->alproto;//AppLayerGetProtoFromPacket(p);
+ AppProto alproto = f->alproto;
if (AppLayerParserProtocolIsTxAware(p->proto, alproto) == 0)
goto end;
if (AppLayerParserProtocolHasLogger(p->proto, alproto) == 0)
goto end;
- void *alstate = f->alstate;//AppLayerGetProtoStateFromPacket((const Packet *)p);
+ void *alstate = f->alstate;
if (alstate == NULL) {
SCLogDebug("no alstate");
goto end;
uint64_t total_txs = AppLayerParserGetTxCnt(p->proto, alproto, alstate);
uint64_t tx_id = AppLayerParserGetTransactionLogId(f->alparser);
int tx_progress_done_value_ts =
- AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto, 0);
+ AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto,
+ STREAM_TOSERVER);
int tx_progress_done_value_tc =
- AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto, 1);
+ AppLayerParserGetStateProgressCompletionStatus(p->proto, alproto,
+ STREAM_TOCLIENT);
int proto_logged = 0;
for (; tx_id < total_txs; tx_id++)
if (!(AppLayerParserStateIssetFlag(f->alparser, APP_LAYER_PARSER_EOF)))
{
- int tx_progress = AppLayerParserGetStateProgress(p->proto, alproto, tx, 0);
+ int tx_progress = AppLayerParserGetStateProgress(p->proto, alproto,
+ tx, STREAM_TOSERVER);
if (tx_progress < tx_progress_done_value_ts) {
SCLogDebug("progress not far enough, not logging");
break;
}
- tx_progress = AppLayerParserGetStateProgress(p->proto, alproto, tx, 1);
+ tx_progress = AppLayerParserGetStateProgress(p->proto, alproto,
+ tx, STREAM_TOCLIENT);
if (tx_progress < tx_progress_done_value_tc) {
SCLogDebug("progress not far enough, not logging");
break;