]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
flow-vars: remove flow locks
authorJason Ish <ish@unx.ca>
Fri, 15 Jul 2016 14:14:03 +0000 (08:14 -0600)
committerVictor Julien <victor@inliniac.net>
Mon, 19 Sep 2016 11:47:52 +0000 (13:47 +0200)
Code is now entered under flow lock.

src/flow-var.c

index 5262b5a795bebe65048d7b2b5ddd59890525db3d..96b3ad3a84ef3b29c0b394eea482f9ea2ca94942 100644 (file)
@@ -88,9 +88,7 @@ void FlowVarAddStrNoLock(Flow *f, uint16_t idx, uint8_t *value, uint16_t size)
 /* add a flowvar to the flow, or update it */
 void FlowVarAddStr(Flow *f, uint16_t idx, uint8_t *value, uint16_t size)
 {
-    FLOWLOCK_WRLOCK(f);
     FlowVarAddStrNoLock(f, idx, value, size);
-    FLOWLOCK_UNLOCK(f);
 }
 
 /* add a flowvar to the flow, or update it */
@@ -117,9 +115,7 @@ void FlowVarAddIntNoLock(Flow *f, uint16_t idx, uint32_t value)
 /* add a flowvar to the flow, or update it */
 void FlowVarAddInt(Flow *f, uint16_t idx, uint32_t value)
 {
-    FLOWLOCK_WRLOCK(f);
     FlowVarAddIntNoLock(f, idx, value);
-    FLOWLOCK_UNLOCK(f);
 }
 
 void FlowVarFree(FlowVar *fv)