mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
fix some cosmetic issues
This commit is contained in:
parent
ec34b01bd9
commit
df9bdce6dc
1 changed files with 3 additions and 4 deletions
|
|
@ -50,7 +50,7 @@ macro_rules! get_icmp_pong {
|
||||||
if let $repr_type::EchoReply { seq_no, data, .. } = $repr {
|
if let $repr_type::EchoReply { seq_no, data, .. } = $repr {
|
||||||
if let Some(_) = $waiting_queue.get(&seq_no) {
|
if let Some(_) = $waiting_queue.get(&seq_no) {
|
||||||
let packet_timestamp_ms = NetworkEndian::read_i64(data);
|
let packet_timestamp_ms = NetworkEndian::read_i64(data);
|
||||||
println!(
|
log::info!(
|
||||||
"{} bytes from {}: icmp_seq={}, time={}ms",
|
"{} bytes from {}: icmp_seq={}, time={}ms",
|
||||||
data.len(),
|
data.len(),
|
||||||
$remote_addr,
|
$remote_addr,
|
||||||
|
|
@ -254,7 +254,7 @@ fn xmain() -> ! {
|
||||||
|
|
||||||
// iface.routes_mut().remove_default_ipv4_route();
|
// iface.routes_mut().remove_default_ipv4_route();
|
||||||
match iface.routes_mut().add_default_ipv4_route(default_v4_gw) {
|
match iface.routes_mut().add_default_ipv4_route(default_v4_gw) {
|
||||||
Ok(route) => log::info!("routing table updated successfully: {:?}", route),
|
Ok(route) => log::info!("routing table updated successfully [{:?}]", route),
|
||||||
Err(e) => log::error!("routing table update error: {}", e),
|
Err(e) => log::error!("routing table update error: {}", e),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -296,13 +296,12 @@ fn xmain() -> ! {
|
||||||
let timestamp = timer.now();
|
let timestamp = timer.now();
|
||||||
let mut socket = sockets.get::<IcmpSocket>(icmp_handle);
|
let mut socket = sockets.get::<IcmpSocket>(icmp_handle);
|
||||||
if !socket.is_open() {
|
if !socket.is_open() {
|
||||||
log::info!("bind to icmp");
|
log::info!("Binding smoltcp to icmp socket");
|
||||||
socket.bind(IcmpEndpoint::Ident(ident)).expect("couldn't bind to icmp socket");
|
socket.bind(IcmpEndpoint::Ident(ident)).expect("couldn't bind to icmp socket");
|
||||||
send_at = timestamp;
|
send_at = timestamp;
|
||||||
}
|
}
|
||||||
|
|
||||||
if socket.can_send() && seq_no < count as u16 && send_at <= timestamp {
|
if socket.can_send() && seq_no < count as u16 && send_at <= timestamp {
|
||||||
log::info!("send icmp {}", count);
|
|
||||||
NetworkEndian::write_i64(&mut echo_payload, timestamp.total_millis());
|
NetworkEndian::write_i64(&mut echo_payload, timestamp.total_millis());
|
||||||
|
|
||||||
let (icmp_repr, mut icmp_packet) = send_icmp_ping!(
|
let (icmp_repr, mut icmp_packet) = send_icmp_ping!(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue