Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
keepsimple1 committed Aug 19, 2024
1 parent 4e7c598 commit 88968b6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
3 changes: 2 additions & 1 deletion src/service_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -455,7 +455,7 @@ impl ServiceDaemon {
.poller
.modify(&intf_sock.sock, polling::Event::readable(ev.key))
{
error!("modify poller for IP {}: {}", &intf.ip(), e);
error!("modify poller for interface {:?}: {}", &intf, e);
break;
}
}
Expand Down Expand Up @@ -956,6 +956,7 @@ impl Zeroconf {
fn new(signal_sock: UdpSocket, poller: Poller) -> Self {
// Get interfaces.
let my_ifaddrs = my_ip_interfaces();

// Create a socket for every IP addr.
// Note: it is possible that `my_ifaddrs` contains duplicated IP addrs.
let mut intf_socks = HashMap::new();
Expand Down
5 changes: 0 additions & 5 deletions tests/mdns_test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ fn integration_success() {
let mut unique_intf_idx_ip_ver_set = HashSet::new();
let mut non_idx_count = 0;
for intf in all_interfaces.iter() {
// println!("intf:: {:?}", intf);
let ip_ver = match intf.addr {
IfAddr::V4(_) => 4u8,
IfAddr::V6(_) => 6u8,
Expand All @@ -42,10 +41,6 @@ fn integration_success() {
non_idx_count += 1;
}
}
println!(
"unique intf with index: {} non idx count: {non_idx_count}",
unique_intf_idx_ip_ver_set.len()
);
let unique_intf_idx_ip_ver_count = unique_intf_idx_ip_ver_set.len() + non_idx_count;

let ifaddrs_set: HashSet<_> = all_interfaces.iter().map(|intf| intf.ip()).collect();
Expand Down

0 comments on commit 88968b6

Please sign in to comment.