android fixes

This commit is contained in:
John Smith
2022-09-07 10:33:14 -04:00
parent a12d8da6d1
commit c36db533f2
12 changed files with 59 additions and 30 deletions

View File

@@ -97,12 +97,17 @@ impl<S: Subscriber + for<'a> registry::LookupSpan<'a>> Layer<S> for ApiTracingLa
let message = format!("{} {}", origin, recorder);
let backtrace = if log_level <= VeilidLogLevel::Error {
Some(std::backtrace::Backtrace)
let bt = backtrace::Backtrace::new();
Some(format!("{:?}", bt))
} else {
None
};
(inner.update_callback)(VeilidUpdate::Log(VeilidStateLog { log_level, message }))
(inner.update_callback)(VeilidUpdate::Log(VeilidStateLog {
log_level,
message,
backtrace,
}))
}
}
}

View File

@@ -608,10 +608,12 @@ impl Network {
self.unlocked_inner
.interfaces
.with_interfaces(|interfaces| {
trace!("interfaces: {:#?}", interfaces);
for (_name, intf) in interfaces {
// Skip networks that we should never encounter
if intf.is_loopback() || !intf.is_running() {
return;
continue;
}
// Add network to local networks table
for addr in &intf.addrs {

View File

@@ -303,7 +303,11 @@ impl RoutingTable {
class: DialInfoClass,
) -> EyreResult<()> {
if !self.ensure_dial_info_is_valid(domain, &dial_info) {
return Err(eyre!("dial info is not valid in this routing domain"));
return Err(eyre!(
"dial info '{}' is not valid in routing domain '{:?}'",
dial_info,
domain
));
}
let mut inner = self.inner.write();
@@ -453,6 +457,8 @@ impl RoutingTable {
}
pub fn configure_local_network_routing_domain(&self, local_networks: Vec<(IpAddr, IpAddr)>) {
log_net!(debug "configure_local_network_routing_domain: {:#?}", local_networks);
let mut inner = self.inner.write();
let changed = inner
.local_network_routing_domain