fix other minor errors

This commit is contained in:
bunnie 2021-03-29 04:44:03 +08:00
parent f35d478cf0
commit c6371e86e7
2 changed files with 4 additions and 7 deletions

View file

@ -16,11 +16,7 @@ log-server = {path = "../log-server"}
ticktimer-server = {path = "../ticktimer-server"}
xous = {path = "../../xous-rs"}
xous-ipc = {path = "../../xous-ipc"}
[dependencies.rkyv]
default-features = false
features = ["const_generics"]
version = "0.4.1"
rkyv = {version = "0.4.3", default-features = false, features = ["const_generics"]}
[target.'cfg(not(any(windows,unix)))'.dependencies]
utralib = {path = "../../utralib"}

View file

@ -110,10 +110,11 @@ fn xmain() -> ! {
info!("NS: name: '{}', sid: '{:?}'", key, val);
}
// no authenticate remedy currently supported, but we'd put that code somewhere around here eventually.
let (c1, c2, c3, c4) = xous::create_server_id().unwrap().to_u32();
let auth_request = AuthenticateRequest {
name: name_string,
pubkey_id: [0; 20], // placeholder
challenge: xous::create_server_id().to_u32().unwrap(),
challenge: [c1, c2, c3, c4],
};
response = api::Return::AuthenticateRequest(auth_request) // this code just exists to exercise the return path
}
@ -122,7 +123,7 @@ fn xmain() -> ! {
Some(api::Opcode::AuthenticatedLookup) => {
let mut mem = msg.body.memory_message_mut().unwrap();
let buffer = unsafe { Buffer::from_memory_message_mut(mem) };
let auth_lookup = buffer.try_into::<api::AuthenticatedLookup>().unwrap();
let auth_lookup = buffer.try_into::<api::AuthenticatedLookup, _>().unwrap();
info!("NS: AuthenticatedLookup request {:?}", auth_lookup);
error!("NS: AuthenticatedLookup not yet implemented");
unimplemented!("NS: AuthenticatedLookup not yet implemented");