From b66c2ee67794efe896e47d9283da59f96a26c337 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sat, 17 Sep 2022 21:49:03 +0200 Subject: [PATCH] updates on init functions --- src/config/mod.rs | 7 ++----- src/ipblc/inc.rs | 2 +- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/config/mod.rs b/src/config/mod.rs index 8c869b6..ff76b92 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -57,10 +57,7 @@ impl Context { // Build context let mut ctx = Context { cfg: Config::new(), - flags: Flags { - debug: debug, - server: server, - }, + flags: Flags { debug, server }, hostname: gethostname(true), discovery: Discovery { version: "1.0".to_string(), @@ -181,7 +178,7 @@ impl Context { tryfail = 100; } let starttime: DateTime = - 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) { Some(set) => { self.blocklist.insert( diff --git a/src/ipblc/inc.rs b/src/ipblc/inc.rs index 20cb54b..c124bb7 100644 --- a/src/ipblc/inc.rs +++ b/src/ipblc/inc.rs @@ -20,7 +20,7 @@ pub async fn process(ctx: &Arc>) { let (ipdatatx, mut ipdatarx): (Sender, Receiver) = channel(ZMQ_CHAN_SIZE); // initialize the firewall table - firewall::init(&env!("CARGO_PKG_NAME").to_string()); + //firewall::init(&env!("CARGO_PKG_NAME").to_string()); // initialize zeromq sockets let reqsocket;