aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-01 19:26:30 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-01 19:26:30 +0200
commite93732d9bb664995d383e9d1ae34206d72dec699 (patch)
treea8fb413452ac45a5364f1e904b33ed87ac3080f9
parentd5272ce486075673f6f8f6ed6034b823a47b9542 (diff)
downloadaerogramme-e93732d9bb664995d383e9d1ae34206d72dec699.tar.gz
aerogramme-e93732d9bb664995d383e9d1ae34206d72dec699.zip
comments
-rw-r--r--src/mail/incoming.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mail/incoming.rs b/src/mail/incoming.rs
index 1d16d38..d40459c 100644
--- a/src/mail/incoming.rs
+++ b/src/mail/incoming.rs
@@ -129,6 +129,8 @@ async fn handle_incoming_mail(user: &Arc<User>, s3: &S3Client, inbox: &Arc<Mailb
unimplemented!()
}
+// ---- UTIL: K2V locking loop, use this to try to grab a lock using a K2V entry as a signal ----
+
fn k2v_lock_loop(k2v: K2vClient, pk: &'static str, sk: &'static str) -> watch::Receiver<bool> {
let (held_tx, held_rx) = watch::channel(false);
@@ -286,6 +288,8 @@ async fn k2v_lock_loop_internal(
info!("lock loop exited: {:?}", res);
}
+// ---- UTIL: function to wait for a value to have changed in K2V ----
+
async fn k2v_wait_value_changed<'a>(
k2v: &'a K2vClient,
pk: &'static str,
@@ -310,7 +314,7 @@ async fn k2v_wait_value_changed<'a>(
}
}
-// ----
+// ---- LMTP SIDE: storing messages encrypted with user's pubkey ----
pub struct EncryptedMessage {
key: cryptoblob::Key,