From 98ca22da1f226fbc362cada280752b09cb58fdd8 Mon Sep 17 00:00:00 2001 From: Ashcon Mohseninia Date: Mon, 10 May 2021 17:10:24 +0100 Subject: [PATCH] Fixes for #24 --- app_rust/src/passthru.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app_rust/src/passthru.rs b/app_rust/src/passthru.rs index 08d2c49..17cde05 100644 --- a/app_rust/src/passthru.rs +++ b/app_rust/src/passthru.rs @@ -208,9 +208,8 @@ impl PassthruDrv { //type PassThruOpenFn = unsafe extern "stdcall" fn(name: *const libc::c_void, device_id: *mut u32) -> i32; pub fn open(&mut self) -> Result { let mut id: u32 = 0; - let name = CString::new("test").unwrap(); let res = - unsafe { (&self.open_fn)(name.as_ptr() as *const libc::c_void, &mut id as *mut u32) }; + unsafe { (&self.open_fn)(std::ptr::null() as *const libc::c_void, &mut id as *mut u32) }; if res == 0x00 { self.is_connected = true; }