]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
packet recycle: remove mutex destroy/init 1104/head
authorVictor Julien <victor@inliniac.net>
Wed, 9 Jul 2014 06:55:47 +0000 (08:55 +0200)
committerVictor Julien <victor@inliniac.net>
Wed, 13 Aug 2014 08:49:10 +0000 (10:49 +0200)
This was necessary earlier when there was a memset involved.

src/decode.h

index f36fdded23e607351e13eeaa7067604a8aa2f5b7..4f83a8be79084b66763b62e84d0ba76530d8750a 100644 (file)
@@ -654,7 +654,6 @@ typedef struct DecodeThreadVars_
 
 /**
  *  \brief Recycle a packet structure for reuse.
- *  \todo the mutex destroy & init is necessary because of the memset, reconsider
  */
 #define PACKET_REINIT(p) do {             \
         CLEAR_ADDR(&(p)->src);                  \
@@ -712,8 +711,6 @@ typedef struct DecodeThreadVars_
         (p)->pcap_cnt = 0;                      \
         (p)->tunnel_rtv_cnt = 0;                \
         (p)->tunnel_tpr_cnt = 0;                \
-        SCMutexDestroy(&(p)->tunnel_mutex);     \
-        SCMutexInit(&(p)->tunnel_mutex, NULL);  \
         (p)->events.cnt = 0;                    \
         AppLayerDecoderEventsResetEvents((p)->app_layer_events); \
         (p)->next = NULL;                       \