(pkt_dir == STREAM_TOSERVER) ? ts_disrupt_flags : tc_disrupt_flags);
AppLayerParserFileTxHousekeeping(f, tx, pkt_dir, (bool)pkt_dir_trunc);
}
- if (txd) {
- // should be reset by parser next time it updates the tx
- if (pkt_dir & STREAM_TOSERVER) {
- txd->updated_ts = false;
- } else {
- txd->updated_tc = false;
- }
+ // should be reset by parser next time it updates the tx
+ if (pkt_dir & STREAM_TOSERVER) {
+ txd->updated_ts = false;
+ } else {
+ txd->updated_tc = false;
}
const int tx_progress_tc =
AppLayerParserGetStateProgress(ipproto, alproto, tx, tc_disrupt_flags);
goto next;
}
- if (txd && has_tx_detect_flags) {
+ if (has_tx_detect_flags) {
if (!IS_DISRUPTED(ts_disrupt_flags) &&
(f->sgh_toserver != NULL || (f->flags & FLOW_SGH_TOSERVER) == 0)) {
if ((txd->flags & (APP_LAYER_TX_INSPECTED_TS | APP_LAYER_TX_SKIP_INSPECT_TS)) ==
goto next;
}
- if (txd && logger_expectation != 0) {
+ if (logger_expectation != 0) {
LoggerId tx_logged = GetTxLogged(txd);
if (tx_logged != logger_expectation) {
SCLogDebug("%p/%"PRIu64" skipping: logging not done: want:%"PRIx32", have:%"PRIx32,
/* if file logging is enabled, we keep a tx active while some of the files aren't
* logged yet. */
- if (txd) {
- SCLogDebug("files_opened %u files_logged %u files_stored %u", txd->files_opened,
- txd->files_logged, txd->files_stored);
-
- if (txd->files_opened) {
- if (g_file_logger_enabled && txd->files_opened != txd->files_logged) {
- skipped = true;
- goto next;
- }
- if (g_filedata_logger_enabled && txd->files_opened != txd->files_stored) {
- skipped = true;
- goto next;
- }
+ SCLogDebug("files_opened %u files_logged %u files_stored %u", txd->files_opened,
+ txd->files_logged, txd->files_stored);
+
+ if (txd->files_opened) {
+ if (g_file_logger_enabled && txd->files_opened != txd->files_logged) {
+ skipped = true;
+ goto next;
+ }
+ if (g_filedata_logger_enabled && txd->files_opened != txd->files_stored) {
+ skipped = true;
+ goto next;
}
}
DetectTransaction *tx, const uint8_t flow_flags, const uint8_t progress)
{
AppLayerTxData *txd = (AppLayerTxData *)tx->tx_data_ptr;
- if (likely(txd != NULL)) {
- if (flow_flags & STREAM_TOSERVER) {
- txd->detect_progress_ts = progress;
- } else {
- txd->detect_progress_tc = progress;
- }
+ if (flow_flags & STREAM_TOSERVER) {
+ txd->detect_progress_ts = progress;
+ } else {
+ txd->detect_progress_tc = progress;
}
}