updates on init functions
This commit is contained in:
parent
48df5def78
commit
b66c2ee677
@ -57,10 +57,7 @@ impl Context {
|
|||||||
// Build context
|
// Build context
|
||||||
let mut ctx = Context {
|
let mut ctx = Context {
|
||||||
cfg: Config::new(),
|
cfg: Config::new(),
|
||||||
flags: Flags {
|
flags: Flags { debug, server },
|
||||||
debug: debug,
|
|
||||||
server: server,
|
|
||||||
},
|
|
||||||
hostname: gethostname(true),
|
hostname: gethostname(true),
|
||||||
discovery: Discovery {
|
discovery: Discovery {
|
||||||
version: "1.0".to_string(),
|
version: "1.0".to_string(),
|
||||||
@ -181,7 +178,7 @@ impl Context {
|
|||||||
tryfail = 100;
|
tryfail = 100;
|
||||||
}
|
}
|
||||||
let starttime: DateTime<FixedOffset> =
|
let starttime: DateTime<FixedOffset> =
|
||||||
DateTime::parse_from_rfc2822(ipdata.date.as_str()).unwrap();
|
DateTime::parse_from_rfc3339(ipdata.date.as_str()).unwrap();
|
||||||
match self.cfg.sets.get(&ipdata.src) {
|
match self.cfg.sets.get(&ipdata.src) {
|
||||||
Some(set) => {
|
Some(set) => {
|
||||||
self.blocklist.insert(
|
self.blocklist.insert(
|
||||||
|
@ -20,7 +20,7 @@ pub async fn process(ctx: &Arc<Mutex<Context>>) {
|
|||||||
let (ipdatatx, mut ipdatarx): (Sender<IpData>, Receiver<IpData>) = channel(ZMQ_CHAN_SIZE);
|
let (ipdatatx, mut ipdatarx): (Sender<IpData>, Receiver<IpData>) = channel(ZMQ_CHAN_SIZE);
|
||||||
|
|
||||||
// initialize the firewall table
|
// initialize the firewall table
|
||||||
firewall::init(&env!("CARGO_PKG_NAME").to_string());
|
//firewall::init(&env!("CARGO_PKG_NAME").to_string());
|
||||||
|
|
||||||
// initialize zeromq sockets
|
// initialize zeromq sockets
|
||||||
let reqsocket;
|
let reqsocket;
|
||||||
|
Loading…
Reference in New Issue
Block a user