Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send SearchStarted events with addrs as ip (intf-name) #245

Merged
merged 5 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ default = ["async", "logging"]

[dependencies]
flume = { version = "0.11", default-features = false } # channel between threads
if-addrs = { version = "0.10", features = ["link-local"] } # get local IP addresses
if-addrs = { version = "0.13", features = ["link-local"] } # get local IP addresses
log = { version = "0.4", optional = true } # logging
polling = "2.1" # select/poll sockets
socket2 = { version = "0.5.5", features = ["all"] } # socket APIs
Expand Down
2 changes: 1 addition & 1 deletion examples/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ fn main() {
}
}
other_event => {
println!("At {:?} : {:?}", now.elapsed(), &other_event);
println!("At {:?}: {:?}", now.elapsed(), &other_event);
}
}
}
Expand Down
12 changes: 9 additions & 3 deletions src/service_daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2038,10 +2038,16 @@ impl Zeroconf {
next_delay: u32,
listener: Sender<ServiceEvent>,
) {
let addr_list: Vec<_> = self.intf_socks.keys().collect();
let pretty_addrs: Vec<String> = self
.intf_socks
.keys()
.map(|itf| format!("{} ({})", itf.ip(), itf.name))
.collect();

if let Err(e) = listener.send(ServiceEvent::SearchStarted(format!(
"{} on addrs {:?}",
&ty, &addr_list
"{} on addrs [{}]",
&ty,
pretty_addrs.join(", ")
))) {
error!(
"Failed to send SearchStarted({})(repeating:{}): {}",
Expand Down