Skip to content

Commit

Permalink
don't allow polls to the unmount to turn true until other callbacks h…
Browse files Browse the repository at this point in the history
…ave been allowed
  • Loading branch information
bunnie committed Nov 3, 2022
1 parent 3bdf157 commit 719020b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion services/pddb/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -680,13 +680,13 @@ fn wrapped_main() -> ! {
},
PasswordState::Uninit => {
if try_mount_or_format(&modals, &mut pddb_os, &mut basis_cache, PasswordState::Uninit, time_resetter) {
is_mounted.store(true, Ordering::SeqCst);
for requester in mount_notifications.drain(..) {
xous::return_scalar2(requester, 0, 0).expect("couldn't return scalar");
}
assert!(mount_notifications.len() == 0, "apparently I don't understand what drain() does");
log::info!("{}PDDB.MOUNTED,{}", xous::BOOKEND_START, xous::BOOKEND_END);
xous::return_scalar2(msg.sender, 0, 0).expect("couldn't return scalar");
is_mounted.store(true, Ordering::SeqCst);
} else {
xous::return_scalar2(msg.sender, 1, 0).expect("couldn't return scalar");
}
Expand Down

0 comments on commit 719020b

Please sign in to comment.