From: Ian Jackson Date: Mon, 17 May 2021 13:22:25 +0000 (+0100) Subject: progress: Make ProgressMode come from MgmtChannel X-Git-Tag: otter-0.6.0~201 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=37aee5c1e98f7fa5d84f8a1f4bd31655e76ac2ae;p=otter.git progress: Make ProgressMode come from MgmtChannel That's where the implementation (and any restrictions) come from. Signed-off-by: Ian Jackson --- diff --git a/src/bin/otter.rs b/src/bin/otter.rs index 66be469a..1fd1b17c 100644 --- a/src/bin/otter.rs +++ b/src/bin/otter.rs @@ -1398,7 +1398,7 @@ mod upload_bundle { size, game: instance_name.clone(), hash: bundles::Hash(hash.into()), kind, - progress: PUM::Simplex, + progress: MgmtChannel::PROGRESS, }; let mut progress = termprogress::new(); chan.cmd_withbulk(&cmd, &mut f, &mut io::sink(), &mut *progress)?; diff --git a/src/mgmtchannel.rs b/src/mgmtchannel.rs index a40d961c..8d8ad02a 100644 --- a/src/mgmtchannel.rs +++ b/src/mgmtchannel.rs @@ -47,6 +47,8 @@ impl Debug for MgmtChannel{ } impl MgmtChannel { + pub const PROGRESS: ProgressUpdateMode = PUM::Simplex; + #[throws(AE)] pub fn connect(socket_path: &str) -> MgmtChannel { let unix = UnixStream::connect(socket_path)