Skip to content

Commit

Permalink
strand-cam: show all listen addresses
Browse files Browse the repository at this point in the history
  • Loading branch information
astraw committed Jul 8, 2024
1 parent fa91c9b commit 2b939b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion flydra-types/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,7 @@ fn expand_unspecified_ip(ip: IpAddr) -> std::io::Result<Vec<IpAddr>> {
}

#[cfg(feature = "build-urls")]
fn expand_unspecified_addr(addr: &SocketAddr) -> std::io::Result<Vec<SocketAddr>> {
pub fn expand_unspecified_addr(addr: &SocketAddr) -> std::io::Result<Vec<SocketAddr>> {
if addr.ip().is_unspecified() {
Ok(expand_unspecified_ip(addr.ip())?
.into_iter()
Expand Down
7 changes: 7 additions & 0 deletions strand-cam/src/strand-cam.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2172,6 +2172,13 @@ where
debug!("Strand Cam listening at {listen_addr}, predicted URL: {url}");
} else {
info!("Strand Cam listening at {listen_addr}, predicted URL: {url}");

if listen_addr.ip().is_unspecified() {
for addr in flydra_types::expand_unspecified_addr(&listen_addr)?.iter() {
info!(" * {addr}");
}
}

if !flydra_types::is_loopback(&url) {
println!("QR code for {url}");
display_qr_url(&format!("{url}"));
Expand Down

0 comments on commit 2b939b1

Please sign in to comment.