From 65a93505b0f90a3755434a497c0bc841408b8e30 Mon Sep 17 00:00:00 2001 From: Paul Lecuq Date: Sun, 18 Dec 2022 19:36:40 +0100 Subject: [PATCH] renamed some variables --- src/ipblc/inc.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ipblc/inc.rs b/src/ipblc/inc.rs index ffae386..e1e6b2e 100644 --- a/src/ipblc/inc.rs +++ b/src/ipblc/inc.rs @@ -60,22 +60,22 @@ pub async fn process(ctx: &Arc>) { let begin: DateTime = Local::now().trunc_subsecs(0); // wait for logs parse and zmq channel receive - let mut recvip = ipdatarx.recv().await.unwrap(); + let mut received_ip = ipdatarx.recv().await.unwrap(); // lock the context mutex let ctxarc = Arc::clone(&ctx); let mut ctx = ctxarc.lock().await; - if recvip.ip == "".to_string() && recvip.mode == "init".to_string() { - for sndip in &mut ctx.get_blocklist_toblock().await { - sndip.mode = "init".to_string(); - send_to_ipbl_zmq(&reqsocket, sndip).await; + if received_ip.ip == "".to_string() && received_ip.mode == "init".to_string() { + for ip_to_send in &mut ctx.get_blocklist_toblock().await { + ip_to_send.mode = "init".to_string(); + send_to_ipbl_zmq(&reqsocket, ip_to_send).await; } continue; } // refresh context blocklist - let filtered_ip = ctx.update_blocklist(&mut recvip).await; + let filtered_ip = ctx.update_blocklist(&mut received_ip).await; ctx.gc_blocklist().await; // send ip list to ws and zmq sockets