fix: resolve rust compilation errors in tun and dependencies
Build and Release Windows Client / build (push) Failing after 38s
Build and Release Windows Client / build (push) Failing after 38s
This commit is contained in:
1 parent
d9e9441b40
commit
727d8c41ca
2 files changed
+4
-2
No files matched your search
@@ -9,6 +9,8 @@ bytes = "1"
|
||||
tonic = "0.12"
|
||||
prost = "0.13"
|
||||
crossbeam-queue = "0.3"
|
||||
hex = "0.4"
|
||||
snow = "0.9"
|
||||
|
||||
[profile.release]
|
||||
opt-level = "z"
|
||||
|
||||
+2
-2
@@ -1,4 +1,4 @@
|
||||
use std::ffi::{c_void, OSString, OsString};
|
||||
use std::ffi::{c_void, OsString};
|
||||
use std::os::windows::ffi::OsStrExt;
|
||||
use std::ptr::{null_mut};
|
||||
use std::io::{self, Read, Write};
|
||||
@@ -94,7 +94,7 @@ impl TunInterface {
|
||||
let packet_ptr = *packet_ptr_ptr;
|
||||
std::ptr::copy_nonoverlapping(buf.as_ptr(), packet_ptr, buf.len());
|
||||
|
||||
if WintunSendPacket(self.tx_ring, &mut packet_ptr_ptr) {
|
||||
if WintunSendPacket(self.tx_ring, packet_ptr_ptr) {
|
||||
Ok(buf.len())
|
||||
} else {
|
||||
Err(io::Error::new(io::ErrorKind::Other, "Failed to send packet"))
|
||||
|
||||
Reference in new issue
Block a user