]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow-manager: cleanups and comment improvements
authorVictor Julien <victor@inliniac.net>
Wed, 19 Oct 2016 10:50:47 +0000 (12:50 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 19 Oct 2016 10:50:47 +0000 (12:50 +0200)
src/flow-manager.c

index dece557ea15b701c91ada279ef8dead5d0e5da4d..a1e78b82bb9a898b88ea71fbde12948511e6c622 100644 (file)
@@ -258,8 +258,8 @@ static int FlowManagerFlowTimeout(const Flow *f, enum FlowState state, struct ti
  */
 static int FlowManagerFlowTimedOut(Flow *f, struct timeval *ts)
 {
-    /** never prune a flow that is used by a packet or stream msg
-     *  we are currently processing in one of the threads */
+    /* never prune a flow that is used by a packet we
+     * are currently processing in one of the threads */
     if (SC_ATOMIC_GET(f->use_cnt) > 0) {
         return 0;
     }
@@ -369,14 +369,10 @@ static uint32_t FlowManagerHashRowTimeout(Flow *f, struct timeval *ts,
                 f->flow_end_flags |= FLOW_END_FLAG_EMERGENCY;
             f->flow_end_flags |= FLOW_END_FLAG_TIMEOUT;
 
-//            FlowClearMemory (f, f->protomap);
-
             /* no one is referring to this flow, use_cnt 0, removed from hash
-             * so we can unlock it and move it back to the spare queue. */
+             * so we can unlock it and pass it to the flow recycler */
             FLOWLOCK_UNLOCK(f);
             FlowEnqueue(&flow_recycle_q, f);
-            /* move to spare list */
-//            FlowMoveToSpare(f);
 
             cnt++;