From: Victor Julien Date: Tue, 12 Nov 2019 11:54:18 +0000 (+0100) Subject: threading: simplify flow timeout loop X-Git-Tag: suricata-6.0.0-beta1~790 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=786e697590248e79d2e1a596b13bb0eebf6d8826;p=thirdparty%2Fsuricata.git threading: simplify flow timeout loop --- diff --git a/src/tm-threads.c b/src/tm-threads.c index 3e4f3d6564..4b4080fb87 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -175,16 +175,9 @@ static void CheckSlot(const TmSlot *slot) */ static int TmThreadTimeoutLoop(ThreadVars *tv, TmSlot *s) { - TmSlot *fw_slot = NULL; + TmSlot *fw_slot = tv->tm_flowworker; int r = TM_ECODE_OK; - for (TmSlot *slot = s; slot != NULL; slot = slot->slot_next) { - if (slot->tm_id == TMM_FLOWWORKER) { - fw_slot = slot; - break; - } - } - if (tv->stream_pq == NULL || fw_slot == NULL) { SCLogDebug("not running TmThreadTimeoutLoop %p/%p", tv->stream_pq, fw_slot); return r;