chiark / gitweb /
cmdlistener: Rename access_bundles
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 17:43:38 +0000 (18:43 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 15 May 2021 17:56:27 +0000 (18:56 +0100)
This is not just for modifying.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
daemon/cmdlistener.rs

index 04096a91547013850cb67a2d69acbdd5482f8439..13a2006d7d6df7ea07d6de6518495f8eb7be5fbd 100644 (file)
@@ -104,7 +104,7 @@ fn execute_and_respond<R,W>(cs: &mut CommandStreamData, cmd: MgmtCommand,
   }
 
   #[throws(MgmtError)]
-  fn modify_bundles<'ig,F,R>(
+  fn access_bundles<'ig,F,R>(
     cs: &mut CommandStreamData,
     ag: &AccountsGuard,
     gref: &'ig Unauthorised<InstanceRef, InstanceName>,
@@ -255,7 +255,7 @@ fn execute_and_respond<R,W>(cs: &mut CommandStreamData, cmd: MgmtCommand,
     MC::UploadBundle { game, size, hash, kind } => {
       let (upload, auth) = {
         let (ag, gref) = start_access_game(&game)?;
-        modify_bundles(
+        access_bundles(
           cs,&ag,&gref, &[TP::UploadBundles],
           &mut |mut ig, mut bundles: BundlesGuard<'_>| {
             bundles.start_upload(&mut ig, kind)
@@ -292,7 +292,7 @@ fn execute_and_respond<R,W>(cs: &mut CommandStreamData, cmd: MgmtCommand,
     }
     MC::ClearBundles { game } => {
       let (ag, gref) = start_access_game(&game)?;
-      modify_bundles(
+      access_bundles(
         cs,&ag,&gref, &[TP::ClearBundles],
         &mut |mut ig, mut bundles: BundlesGuard<'_>| {
           bundles.clear(&mut ig)