diff --git a/scripts/run_2.sh b/scripts/run_2.sh index 7000b345..1f786376 100755 --- a/scripts/run_2.sh +++ b/scripts/run_2.sh @@ -1,4 +1,4 @@ #!/bin/bash -exec ./run_local_test.py 2 --config-file ./local-test.yml $1 +exec ./run_local_test.py 2 --config-file ./local-test.yml $@ diff --git a/scripts/run_20.sh b/scripts/run_20.sh index 195d9cfb..21022a7d 100755 --- a/scripts/run_20.sh +++ b/scripts/run_20.sh @@ -1,4 +1,4 @@ #!/bin/bash -exec ./run_local_test.py 20 --config-file ./local-test.yml $1 +exec ./run_local_test.py 20 --config-file ./local-test.yml $@ diff --git a/scripts/run_4.sh b/scripts/run_4.sh index dc008976..d29e7a0f 100755 --- a/scripts/run_4.sh +++ b/scripts/run_4.sh @@ -1,4 +1,4 @@ #!/bin/bash -exec ./run_local_test.py 4 --config-file ./local-test.yml $1 +exec ./run_local_test.py 4 --config-file ./local-test.yml $@ diff --git a/scripts/run_8.sh b/scripts/run_8.sh index 411472ef..863f97f2 100755 --- a/scripts/run_8.sh +++ b/scripts/run_8.sh @@ -1,4 +1,4 @@ #!/bin/bash -exec ./run_local_test.py 8 --config-file ./local-test.yml $1 +exec ./run_local_test.py 8 --config-file ./local-test.yml $@ diff --git a/veilid-core/src/intf/native/network/protocol/mod.rs b/veilid-core/src/intf/native/network/protocol/mod.rs index 6cc18d1c..538e1b5f 100644 --- a/veilid-core/src/intf/native/network/protocol/mod.rs +++ b/veilid-core/src/intf/native/network/protocol/mod.rs @@ -81,7 +81,7 @@ pub fn new_shared_tcp_socket(local_address: SocketAddr) -> Result Result>( &self, - dial_info: DialInfo, + dial_info: &DialInfo, rcpt_data: B, alternate_port: bool, ) -> Result<(), String> { @@ -553,11 +553,11 @@ impl NetworkManager { // Send receipt directly if alternate_port { self.net() - .send_data_unbound_to_dial_info(&dial_info, rcpt_data.as_ref().to_vec()) + .send_data_unbound_to_dial_info(dial_info, rcpt_data.as_ref().to_vec()) .await } else { self.net() - .send_data_to_dial_info(&dial_info, rcpt_data.as_ref().to_vec()) + .send_data_to_dial_info(dial_info, rcpt_data.as_ref().to_vec()) .await } } diff --git a/veilid-core/src/rpc_processor/mod.rs b/veilid-core/src/rpc_processor/mod.rs index 64b9a139..452a4a5c 100644 --- a/veilid-core/src/rpc_processor/mod.rs +++ b/veilid-core/src/rpc_processor/mod.rs @@ -945,9 +945,12 @@ impl RPCProcessor { // Possibly from an alternate port let network_manager = self.network_manager(); network_manager - .send_direct_receipt(dial_info, rcpt_data, alternate_port) + .send_direct_receipt(&dial_info, rcpt_data, alternate_port) .await - .map_err(map_error_string!())?; + .map_err(map_error_string!()) + .map_err( + logthru_net!(error "failed to send direct receipt to dial info: {}, alternate_port={}", dial_info, alternate_port), + )?; Ok(()) } diff --git a/veilid-core/src/xx/bump_port.rs b/veilid-core/src/xx/bump_port.rs index c2758bcc..60619928 100644 --- a/veilid-core/src/xx/bump_port.rs +++ b/veilid-core/src/xx/bump_port.rs @@ -15,7 +15,7 @@ pub enum BumpPortType { pub fn tcp_port_available(addr: &SocketAddr) -> bool { cfg_if! { if #[cfg(target_arch = "wasm32")] { - false + true } else { match TcpListener::bind(addr) { Ok(_) => true, @@ -28,7 +28,7 @@ pub fn tcp_port_available(addr: &SocketAddr) -> bool { pub fn udp_port_available(addr: &SocketAddr) -> bool { cfg_if! { if #[cfg(target_arch = "wasm32")] { - false + true } else { match UdpSocket::bind(addr) { Ok(_) => true,