mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-19 09:00:54 +00:00
Merge branch 'main' into u2f
This commit is contained in:
commit
740c3a8572
2 changed files with 4 additions and 2 deletions
|
|
@ -219,7 +219,7 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
|
||||||
"test" => {
|
"test" => {
|
||||||
let bname = tokens.next();
|
let bname = tokens.next();
|
||||||
// zero-length key test
|
// zero-length key test
|
||||||
let mut test_handle = pddb::Pddb::new();
|
let test_handle = pddb::Pddb::new();
|
||||||
// build a key, but don't write to it.
|
// build a key, but don't write to it.
|
||||||
let _ = test_handle.get(
|
let _ = test_handle.get(
|
||||||
"test",
|
"test",
|
||||||
|
|
@ -254,7 +254,7 @@ impl<'a> ShellCmdApi<'a> for PddbCmd {
|
||||||
log::info!("finished dict delete with zero-length key");
|
log::info!("finished dict delete with zero-length key");
|
||||||
|
|
||||||
// seek test - a bunch of terrible, handcrafted test cases to exercise Start, Current, End cases of seeking.
|
// seek test - a bunch of terrible, handcrafted test cases to exercise Start, Current, End cases of seeking.
|
||||||
let mut test_handle = pddb::Pddb::new();
|
let test_handle = pddb::Pddb::new();
|
||||||
// build a key, but don't write to it.
|
// build a key, but don't write to it.
|
||||||
let mut seekwrite = test_handle.get(
|
let mut seekwrite = test_handle.get(
|
||||||
"test",
|
"test",
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ impl ConnectRequest {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Request a connection to the nameserver-managed `name`.
|
||||||
pub fn connect(name: &str) -> Option<crate::CID> {
|
pub fn connect(name: &str) -> Option<crate::CID> {
|
||||||
let mut request = ConnectRequest::new(name)?;
|
let mut request = ConnectRequest::new(name)?;
|
||||||
let ns_cid = nameserver();
|
let ns_cid = nameserver();
|
||||||
|
|
@ -96,6 +97,7 @@ pub fn connect(name: &str) -> Option<crate::CID> {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Return the connection ID of the nameserver
|
||||||
pub(crate) fn nameserver() -> crate::CID {
|
pub(crate) fn nameserver() -> crate::CID {
|
||||||
static NAMESERVER_CID: AtomicU32 = AtomicU32::new(0);
|
static NAMESERVER_CID: AtomicU32 = AtomicU32::new(0);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue