mirror of
https://github.com/Astatin3/unshell.git
synced 2026-06-08 22:38:01 -06:00
Clean up the code a little bit
This commit is contained in:
@@ -2,6 +2,7 @@ use bincode::{Decode, Encode};
|
||||
|
||||
use crate::config::RuntimeConfig;
|
||||
|
||||
/// Mostly temporary server message type
|
||||
#[derive(Debug, Encode, Decode)]
|
||||
pub enum Announcement {
|
||||
TestAnnouncement(String),
|
||||
|
||||
@@ -85,10 +85,7 @@ impl ClientRuntime {
|
||||
}
|
||||
|
||||
impl ModuleRuntime for ClientRuntime {
|
||||
// fn init(&mut self) {}
|
||||
|
||||
fn is_running(&self) -> bool {
|
||||
// println!("Checking if running");
|
||||
!self.thread_handle.is_finished()
|
||||
}
|
||||
|
||||
@@ -97,6 +94,5 @@ impl ModuleRuntime for ClientRuntime {
|
||||
self.join_signal.store(true, Ordering::Relaxed);
|
||||
let _ = self.thread_handle.join();
|
||||
}
|
||||
// drop(self);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@ use unshell_obfuscate::obfuscated_symbol;
|
||||
|
||||
use crate::config::NamedComponent;
|
||||
|
||||
/// Publicly facing accessor function for the payload to load inside the breakout modules.
|
||||
#[obfuscated_symbol]
|
||||
pub fn get_components() -> Vec<NamedComponent> {
|
||||
return vec![
|
||||
|
||||
@@ -41,6 +41,7 @@ impl Logger for DefaultLogger {
|
||||
}
|
||||
|
||||
pub fn set_logger_box(logger: Box<dyn Logger>) {
|
||||
#[cfg(feature = "log")]
|
||||
unsafe {
|
||||
LOGGER = Box::leak(logger);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user