Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Feb 1, 2024
1 parent 98e06e5 commit e03d5ea
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 6 deletions.
4 changes: 2 additions & 2 deletions commons/zenoh-util/src/std_only/net/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ unsafe fn get_adapters_adresses() -> ZResult<Vec<u8>> {
}
retries += 1;
}

if ret != 0 {
bail!("GetAdaptersAddresses returned {}", ret)
}
Expand Down Expand Up @@ -228,7 +228,7 @@ pub fn get_local_addresses() -> ZResult<Vec<IpAddr>> {
use winapi::um::iptypes::IP_ADAPTER_ADDRESSES_LH;

let buffer = get_adapters_adresses()?;

let mut result = vec![];
let mut next_iface = (buffer.as_ptr() as *mut IP_ADAPTER_ADDRESSES_LH).as_ref();
while let Some(iface) = next_iface {
Expand Down
16 changes: 12 additions & 4 deletions io/zenoh-links/zenoh-link-tcp/src/unicast.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,13 +148,21 @@ impl LinkUnicastTrait for LinkUnicastTcp {
fn get_interfaces(&self) -> Vec<String> {
match zenoh_util::net::get_interfaces_by_addr(self.src_addr.ip()) {
Ok(interfaces) => {
log::debug!("get_interfaces for {:?}: {:?}", self.src_addr.ip(), interfaces);
log::debug!(
"get_interfaces for {:?}: {:?}",
self.src_addr.ip(),
interfaces
);
interfaces
},
}
Err(e) => {
log::error!("get_interfaces for {:?} failed: {:?}", self.src_addr.ip(), e);
log::error!(
"get_interfaces for {:?} failed: {:?}",
self.src_addr.ip(),
e
);
vec![]
},
}
}
}

Expand Down

0 comments on commit e03d5ea

Please sign in to comment.