mirror of
https://github.com/LibreQoE/LibreQoS.git
synced 2024-11-24 17:20:16 -06:00
WIP: Remove diagnostic prints.
This commit is contained in:
parent
d8f7c0e6db
commit
0d6c9d38fd
@ -41,14 +41,10 @@ pub fn load_config() -> Result<Arc<Config>, LibreQoSConfigError> {
|
|||||||
// If we have a cached version, return it
|
// If we have a cached version, return it
|
||||||
let mut lock = LOADER_MUTEX.lock().unwrap();
|
let mut lock = LOADER_MUTEX.lock().unwrap();
|
||||||
*lock = !(*lock); // Not actually useful, prevents it from being optimized away
|
*lock = !(*lock); // Not actually useful, prevents it from being optimized away
|
||||||
println!("Config lock obtained");
|
|
||||||
if CONFIG_LOADED.load(std::sync::atomic::Ordering::SeqCst) {
|
if CONFIG_LOADED.load(std::sync::atomic::Ordering::SeqCst) {
|
||||||
println!("Returning cached config version");
|
|
||||||
let clone = CONFIG.load().clone();
|
let clone = CONFIG.load().clone();
|
||||||
println!("Cloned the existing config");
|
|
||||||
return Ok(clone);
|
return Ok(clone);
|
||||||
}
|
}
|
||||||
println!("Not cached");
|
|
||||||
|
|
||||||
let config_location = if let Ok(lqos_config) = std::env::var("LQOS_CONFIG") {
|
let config_location = if let Ok(lqos_config) = std::env::var("LQOS_CONFIG") {
|
||||||
info!("Overriding lqos.conf location from environment variable.");
|
info!("Overriding lqos.conf location from environment variable.");
|
||||||
@ -86,11 +82,9 @@ pub fn load_config() -> Result<Arc<Config>, LibreQoSConfigError> {
|
|||||||
final_config.lqos_directory = lqos_dir;
|
final_config.lqos_directory = lqos_dir;
|
||||||
}
|
}
|
||||||
|
|
||||||
println!("Final config loaded");
|
|
||||||
debug!("Set cached version of config file");
|
debug!("Set cached version of config file");
|
||||||
let new_config = Arc::new(final_config.clone());
|
let new_config = Arc::new(final_config.clone());
|
||||||
|
|
||||||
println!("Returning config");
|
|
||||||
Ok(new_config)
|
Ok(new_config)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user