diff options
| author | David Lönnhager <david.l@mullvad.net> | 2020-03-04 17:36:07 +0100 |
|---|---|---|
| committer | David Lönnhager <david.l@mullvad.net> | 2020-03-16 12:54:27 +0100 |
| commit | e39ec0ca4a549c36569548f2bdc569876b446018 (patch) | |
| tree | 0d1927ceb4ffd05c80c1dfd56ce34198c90b9dc1 | |
| parent | 2ced85b21dec7fe9bfd06233751f0b4111854bd7 (diff) | |
| download | mullvadvpn-e39ec0ca4a549c36569548f2bdc569876b446018.tar.xz mullvadvpn-e39ec0ca4a549c36569548f2bdc569876b446018.zip | |
Rename TemporaryShutdown to PrepareRestart
| -rw-r--r-- | mullvad-daemon/src/lib.rs | 8 | ||||
| -rw-r--r-- | mullvad-daemon/src/management_interface.rs | 12 | ||||
| -rw-r--r-- | mullvad-ipc-client/src/lib.rs | 4 |
3 files changed, 12 insertions, 12 deletions
diff --git a/mullvad-daemon/src/lib.rs b/mullvad-daemon/src/lib.rs index 24276a439d..bca668bc28 100644 --- a/mullvad-daemon/src/lib.rs +++ b/mullvad-daemon/src/lib.rs @@ -215,9 +215,9 @@ pub enum DaemonCommand { FactoryReset(oneshot::Sender<()>), /// Makes the daemon exit the main loop and quit. Shutdown, - /// Saves the target tunnel state and quits in a blocking state. The state is restored + /// Saves the target tunnel state and enters a blocking state. The state is restored /// upon restart. - TemporaryShutdown, + PrepareRestart, } /// All events that can happen in the daemon. Sent from various threads and exposed interfaces. @@ -985,7 +985,7 @@ where #[cfg(not(target_os = "android"))] FactoryReset(tx) => self.on_factory_reset(tx), Shutdown => self.trigger_shutdown_event(), - TemporaryShutdown => self.on_temporary_shutdown(), + PrepareRestart => self.on_prepare_restart(), } } @@ -1705,7 +1705,7 @@ where self.disconnect_tunnel(); } - fn on_temporary_shutdown(&mut self) { + fn on_prepare_restart(&mut self) { // TODO: See if this can be made to also shut down the daemon // without causing the service to be restarted. diff --git a/mullvad-daemon/src/management_interface.rs b/mullvad-daemon/src/management_interface.rs index be4842dd43..e0f7a94b4e 100644 --- a/mullvad-daemon/src/management_interface.rs +++ b/mullvad-daemon/src/management_interface.rs @@ -108,10 +108,10 @@ build_rpc_trait! { #[rpc(meta, name = "shutdown")] fn shutdown(&self, Self::Metadata) -> BoxFuture<(), Error>; - /// Saves the target tunnel state and quits in a blocking state. The state is restored + /// Saves the target tunnel state and enters a blocking state. The state is restored /// upon restart. - #[rpc(meta, name = "temporary_shutdown")] - fn temporary_shutdown(&self, Self::Metadata) -> BoxFuture<(), Error>; + #[rpc(meta, name = "prepare_restart")] + fn prepare_restart(&self, Self::Metadata) -> BoxFuture<(), Error>; /// Get previously used account tokens from the account history #[rpc(meta, name = "get_account_history")] @@ -535,9 +535,9 @@ impl ManagementInterfaceApi for ManagementInterface { Box::new(self.send_command_to_daemon(DaemonCommand::Shutdown)) } - fn temporary_shutdown(&self, _: Self::Metadata) -> BoxFuture<(), Error> { - log::debug!("temporary_shutdown"); - Box::new(self.send_command_to_daemon(DaemonCommand::TemporaryShutdown)) + fn prepare_restart(&self, _: Self::Metadata) -> BoxFuture<(), Error> { + log::debug!("prepare_restart"); + Box::new(self.send_command_to_daemon(DaemonCommand::PrepareRestart)) } fn get_account_history(&self, _: Self::Metadata) -> BoxFuture<Vec<AccountToken>, Error> { diff --git a/mullvad-ipc-client/src/lib.rs b/mullvad-ipc-client/src/lib.rs index 7f9709abcd..511f68ae3e 100644 --- a/mullvad-ipc-client/src/lib.rs +++ b/mullvad-ipc-client/src/lib.rs @@ -223,8 +223,8 @@ impl DaemonRpcClient { self.call("shutdown", &NO_ARGS) } - pub fn temporary_shutdown(&mut self) -> Result<()> { - self.call("temporary_shutdown", &NO_ARGS) + pub fn prepare_restart(&mut self) -> Result<()> { + self.call("prepare_restart", &NO_ARGS) } pub fn factory_reset(&mut self) -> Result<()> { |
