a bit more debug info
parent
534403b170
commit
595367ab87
|
@ -128,6 +128,7 @@ fn set_endpoint(public_key: &str, endpoint: Option<&Endpoint>) -> Option<PeerCon
|
|||
endpoint
|
||||
.and_then(|endpoint| endpoint.resolve().ok())
|
||||
.map(|addr| {
|
||||
log::trace!("set_endpoint({}, {})", public_key, addr);
|
||||
PeerConfigBuilder::new(&Key::from_base64(public_key).unwrap()).set_endpoint(addr)
|
||||
})
|
||||
}
|
||||
|
|
|
@ -392,10 +392,11 @@ pub fn get_by_name(name: &InterfaceName) -> Result<Device, io::Error> {
|
|||
};
|
||||
|
||||
let result = if ret == 0 && !device.is_null() {
|
||||
println!("kernel get_by_name: wg FFI ret code was normal.");
|
||||
Ok(Device::from(unsafe { &*device }))
|
||||
} else {
|
||||
let last_error = io::Error::last_os_error();
|
||||
println!("FFI ret code was {}, &device is {:p}, last OS error: {:?}", ret, device, last_error.raw_os_error());
|
||||
println!("kernel get_by_name: FFI ret code was {}, &device is {:p}, last OS error: {:?}", ret, device, last_error.raw_os_error());
|
||||
Err(last_error)
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue