From bd3fac73b1c20eba1577023adb7cafc80b083bd3 Mon Sep 17 00:00:00 2001 From: Victor Julien Date: Wed, 29 Jan 2020 08:27:43 +0100 Subject: [PATCH] threading: fix global declaration of trans_q --- src/suricata.h | 5 +---- src/tm-threads.c | 5 +++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/suricata.h b/src/suricata.h index a05febdb52..3fd30650a9 100644 --- a/src/suricata.h +++ b/src/suricata.h @@ -125,10 +125,7 @@ enum { #include "runmodes.h" -/* queue's between various other threads - * XXX move to the TmQueue structure later - */ -PacketQueue trans_q[256]; +extern PacketQueue trans_q[256]; typedef struct SCInstance_ { enum RunModes run_mode; diff --git a/src/tm-threads.c b/src/tm-threads.c index 95c14e1a5d..aca6d96467 100644 --- a/src/tm-threads.c +++ b/src/tm-threads.c @@ -80,6 +80,11 @@ ThreadVars *tv_root[TVT_MAX] = { NULL }; /* lock to protect tv_root */ SCMutex tv_root_lock = SCMUTEX_INITIALIZER; +/* queue's between various other threads + * XXX move to the TmQueue structure later + */ +PacketQueue trans_q[256]; + /** * \brief Check if a thread flag is set. * -- 2.47.2