mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-02 02:35:31 +00:00
aquatic_udp: split handlers.rs into submodules
This commit is contained in:
parent
f65bcd7f56
commit
ff49022efe
7 changed files with 497 additions and 457 deletions
|
|
@ -8,14 +8,17 @@ use aquatic_common::access_list::AccessListMode;
|
|||
use crate::common::*;
|
||||
use crate::config::Config;
|
||||
|
||||
pub fn update_access_list(config: &Config, torrent_maps: &mut TorrentMaps){
|
||||
pub fn update_access_list(config: &Config, torrent_maps: &mut TorrentMaps) {
|
||||
match config.access_list.mode {
|
||||
AccessListMode::Require | AccessListMode::Forbid => {
|
||||
if let Err(err) = torrent_maps.access_list.update_from_path(&config.access_list.path) {
|
||||
if let Err(err) = torrent_maps
|
||||
.access_list
|
||||
.update_from_path(&config.access_list.path)
|
||||
{
|
||||
::log::error!("Update access list from path: {:?}", err);
|
||||
}
|
||||
}
|
||||
AccessListMode::Ignore => { }
|
||||
AccessListMode::Ignore => {}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -28,7 +31,6 @@ pub fn clean_connections(state: &State) {
|
|||
connections.shrink_to_fit();
|
||||
}
|
||||
|
||||
|
||||
pub fn gather_and_print_statistics(state: &State, config: &Config) {
|
||||
let interval = config.statistics.interval;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue