Fixing redeclaration of run_mode

remotes/origin/master-1.0.x
Pablo Rincon 17 years ago committed by Victor Julien
parent 5592189c04
commit 7f250a814a

@ -46,6 +46,9 @@ static int FlowClearMemory(Flow *,uint8_t );
int FlowSetProtoFreeFunc(uint8_t, void (*Free)(void *));
int FlowSetFlowStateFunc (uint8_t , int (*GetProtoState)(void *));
/* Run mode selected at suricata.c */
extern int run_mode;
/** \brief Update the flows position in the queue's
* \param f Flow to requeue.
* \todo if we have a flow state func rely on that soly

@ -107,6 +107,9 @@ volatile sig_atomic_t sigterm_count = 0;
static uint8_t sigflags = 0;
/* Run mode selected */
int run_mode = MODE_UNKNOWN;
static void SignalHandlerSigint(/*@unused@*/ int sig) { sigint_count = 1; sigflags |= SURICATA_SIGINT; }
static void SignalHandlerSigterm(/*@unused@*/ int sig) { sigterm_count = 1; sigflags |= SURICATA_SIGTERM; }
static void SignalHandlerSighup(/*@unused@*/ int sig) { sighup_count = 1; sigflags |= SURICATA_SIGHUP; }
@ -300,7 +303,6 @@ void usage(const char *progname)
int main(int argc, char **argv)
{
int opt;
int run_mode = MODE_UNKNOWN;
char *pcap_file = NULL;
char *pcap_dev = NULL;
char *pfring_dev = NULL;

@ -41,8 +41,6 @@ enum {
MODE_NFQ,
MODE_UNITTEST
};
/* Run mode selected */
int run_mode;
/* preallocated packet structures here
* XXX move to the packetpool queue handler code

Loading…
Cancel
Save