diff --git a/src/gui/types/sniffer.rs b/src/gui/types/sniffer.rs index 5711a221..7c37576d 100644 --- a/src/gui/types/sniffer.rs +++ b/src/gui/types/sniffer.rs @@ -397,7 +397,7 @@ impl Sniffer { let current_capture_id = self.current_capture_id.clone(); let filters = self.filters; let country_mmdb_reader = self.country_mmdb_reader.clone(); - let asn_mmdb_reader = self.country_mmdb_reader.clone(); + let asn_mmdb_reader = self.asn_mmdb_reader.clone(); self.status_pair.1.notify_all(); thread::Builder::new() .name("thread_parse_packets".to_string()) diff --git a/src/utils/asn.rs b/src/utils/asn.rs index 49ce7171..f36399de 100644 --- a/src/utils/asn.rs +++ b/src/utils/asn.rs @@ -9,12 +9,12 @@ pub enum MmdbReader { Custom(Reader>), } -pub fn mmdb_reader(mmdb_asn_path: &String, default_mmdb: &'static [u8]) -> MmdbReader { +pub fn mmdb_reader(mmdb_path: &String, default_mmdb: &'static [u8]) -> MmdbReader { let default_reader = maxminddb::Reader::from_source(default_mmdb).unwrap(); - if mmdb_asn_path.is_empty() { + if mmdb_path.is_empty() { MmdbReader::Default(default_reader) } else { - let custom_reader_result = maxminddb::Reader::open_readfile(mmdb_asn_path); + let custom_reader_result = maxminddb::Reader::open_readfile(mmdb_path); if let Ok(custom_reader) = custom_reader_result { return MmdbReader::Custom(custom_reader); }