From: Victor Julien Date: Wed, 29 Jan 2020 07:27:43 +0000 (+0100) Subject: threading: fix global declaration of trans_q X-Git-Tag: suricata-5.0.2~19 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bd3fac73b1c20eba1577023adb7cafc80b083bd3;p=thirdparty%2Fsuricata.git threading: fix global declaration of trans_q --- 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. *