mirror of
https://github.com/jkcoxson/idevice.git
synced 2026-03-02 14:36:16 +01:00
Take ownership of socket in rsd_handshake_new FFI
This commit is contained in:
@@ -63,7 +63,7 @@ pub unsafe extern "C" fn rsd_handshake_new(
|
|||||||
return ffi_err!(IdeviceError::FfiInvalidArg);
|
return ffi_err!(IdeviceError::FfiInvalidArg);
|
||||||
}
|
}
|
||||||
|
|
||||||
let wrapper = unsafe { &mut *socket };
|
let mut wrapper = unsafe { Box::from_raw(socket) };
|
||||||
|
|
||||||
let res = match wrapper.inner.take() {
|
let res = match wrapper.inner.take() {
|
||||||
Some(mut w) => run_sync(async move { RsdHandshake::new(w.as_mut()).await }),
|
Some(mut w) => run_sync(async move { RsdHandshake::new(w.as_mut()).await }),
|
||||||
|
|||||||
Reference in New Issue
Block a user