summaryrefslogtreecommitdiffhomepage
path: root/mullvad-setup/src
diff options
context:
space:
mode:
authorDavid Lönnhager <david.l@mullvad.net>2021-11-22 16:30:17 +0100
committerDavid Lönnhager <david.l@mullvad.net>2022-03-14 12:08:44 +0100
commit8f00a86b580a4eb4324724c3fd9d1d001e56b672 (patch)
treede25c176b36f4591adecc7d725cf0932a1eea5c4 /mullvad-setup/src
parent2ea9a7742c6bc0b2b70b7d2ec88ec8218626e042 (diff)
downloadmullvadvpn-8f00a86b580a4eb4324724c3fd9d1d001e56b672.tar.xz
mullvadvpn-8f00a86b580a4eb4324724c3fd9d1d001e56b672.zip
Rename wireguard key removal function
Diffstat (limited to 'mullvad-setup/src')
-rw-r--r--mullvad-setup/src/main.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/mullvad-setup/src/main.rs b/mullvad-setup/src/main.rs
index 37061c8854..a5a4761454 100644
--- a/mullvad-setup/src/main.rs
+++ b/mullvad-setup/src/main.rs
@@ -17,7 +17,7 @@ lazy_static::lazy_static! {
}
const KEY_RETRY_INTERVAL: Duration = Duration::ZERO;
-const KEY_RETRY_MAX_RETRIES: usize = 2;
+const KEY_RETRY_MAX_RETRIES: usize = 4;
#[repr(i32)]
enum ExitStatus {
@@ -63,8 +63,8 @@ pub enum Error {
#[error(display = "Failed to initialize mullvad RPC runtime")]
RpcInitializationError(#[error(source)] mullvad_rpc::Error),
- #[error(display = "Failed to remove WireGuard key for account")]
- RemoveKeyError(#[error(source)] mullvad_rpc::rest::Error),
+ #[error(display = "Failed to remove device from account")]
+ RemoveDeviceError(#[error(source)] mullvad_rpc::rest::Error),
#[error(display = "Failed to obtain settings directory path")]
SettingsPathError(#[error(source)] SettingsPathErrorType),
@@ -90,7 +90,7 @@ async fn main() {
App::new("prepare-restart")
.about("Move a running daemon into a blocking state and save its target state"),
App::new("reset-firewall").about("Remove any firewall rules introduced by the daemon"),
- App::new("remove-wireguard-key").about("Removes the WireGuard key from the active account"),
+ App::new("remove-device").about("Remove the current device from the active account"),
App::new("is-older-version")
.about("Checks whether the given version is older than the current version")
.arg(
@@ -113,7 +113,7 @@ async fn main() {
let result = match matches.subcommand() {
Some(("prepare-restart", _)) => prepare_restart().await,
Some(("reset-firewall", _)) => reset_firewall().await,
- Some(("remove-wireguard-key", _)) => remove_wireguard_key().await,
+ Some(("remove-device", _)) => remove_device().await,
Some(("is-older-version", sub_matches)) => {
let old_version = sub_matches.value_of("OLDVERSION").unwrap();
match is_older_version(old_version).await {
@@ -162,7 +162,7 @@ async fn reset_firewall() -> Result<(), Error> {
.map_err(Error::FirewallError)
}
-async fn remove_wireguard_key() -> Result<(), Error> {
+async fn remove_device() -> Result<(), Error> {
let (cache_path, settings_path) = get_paths()?;
let (mut cacher, data) = mullvad_daemon::device::DeviceCacher::new(&settings_path)
.await
@@ -192,7 +192,7 @@ async fn remove_wireguard_key() -> Result<(), Error> {
KEY_RETRY_MAX_RETRIES,
)
.await
- .map_err(Error::RemoveKeyError)?;
+ .map_err(Error::RemoveDeviceError)?;
cacher
.write(None)