Skip to content
Snippets Groups Projects
Commit 429a5ad1 authored by Sébastien Blin's avatar Sébastien Blin Committed by Adrien Béraud
Browse files

dhtrunner: fix put_encrypted API

parent 01bc43af
No related branches found
No related tags found
No related merge requests found
...@@ -239,15 +239,14 @@ impl DhtRunner { ...@@ -239,15 +239,14 @@ impl DhtRunner {
} }
} }
pub fn put_encrypted<'a>(&mut self, h: &InfoHash, v: Box<Value>, pub fn put_encrypted<'a>(&mut self, h: &InfoHash, to: &InfoHash, v: Box<Value>,
to: &InfoHash,
done_cb: &'a mut(dyn FnMut(bool)), permanent: bool) { done_cb: &'a mut(dyn FnMut(bool)), permanent: bool) {
let handler = Box::new(PutHandler { let handler = Box::new(PutHandler {
done_cb, done_cb,
}); });
let handler = Box::into_raw(handler) as *mut c_void; let handler = Box::into_raw(handler) as *mut c_void;
unsafe { unsafe {
dht_runner_put_encrypted(&mut *self, h, &*v, to, put_handler_done, handler, permanent) dht_runner_put_encrypted(&mut *self, h, to, &*v, put_handler_done, handler, permanent)
} }
} }
......
...@@ -199,8 +199,8 @@ extern { ...@@ -199,8 +199,8 @@ extern {
done_cb: extern fn(bool, *mut c_void), done_cb: extern fn(bool, *mut c_void),
cb_user_data: *mut c_void, cb_user_data: *mut c_void,
permanent: bool); permanent: bool);
pub fn dht_runner_put_encrypted(dht: *mut DhtRunner, h: *const InfoHash, v: *const Value, pub fn dht_runner_put_encrypted(dht: *mut DhtRunner, h: *const InfoHash,
to: *const InfoHash, to: *const InfoHash, v: *const Value,
done_cb: extern fn(bool, *mut c_void), done_cb: extern fn(bool, *mut c_void),
cb_user_data: *mut c_void, cb_user_data: *mut c_void,
permanent: bool); permanent: bool);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment