diff options
| author | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-27 10:55:50 -0300 |
|---|---|---|
| committer | Janito Vaqueiro Ferreira Filho <janito@mullvad.net> | 2018-08-29 10:33:45 -0300 |
| commit | f2dbae265bc70554cc37f2d50fa9c96af9e6c59b (patch) | |
| tree | 5553c3b217a69b12728d754a38504ec11fa22f5a | |
| parent | 59f529d6da092ffa57dd9ca02746938928079525 (diff) | |
| download | mullvadvpn-f2dbae265bc70554cc37f2d50fa9c96af9e6c59b.tar.xz mullvadvpn-f2dbae265bc70554cc37f2d50fa9c96af9e6c59b.zip | |
Rename `account_token` to `username` in Talpid
| -rw-r--r-- | talpid-core/src/tunnel/mod.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/talpid-core/src/tunnel/mod.rs b/talpid-core/src/tunnel/mod.rs index 98d2d0e2d0..c09eaa61bd 100644 --- a/talpid-core/src/tunnel/mod.rs +++ b/talpid-core/src/tunnel/mod.rs @@ -144,7 +144,7 @@ impl TunnelMonitor { tunnel_endpoint: TunnelEndpoint, tunnel_options: &TunnelOptions, tunnel_alias: Option<OsString>, - account_token: &str, + username: &str, log: Option<&Path>, resource_dir: &Path, on_event: L, @@ -156,8 +156,8 @@ impl TunnelMonitor { TunnelEndpointData::OpenVpn(_) => (), TunnelEndpointData::Wireguard(_) => bail!(ErrorKind::UnsupportedTunnelProtocol), } - let user_pass_file = Self::create_user_pass_file(account_token) - .chain_err(|| ErrorKind::CredentialsWriteError)?; + let user_pass_file = + Self::create_user_pass_file(username).chain_err(|| ErrorKind::CredentialsWriteError)?; let cmd = Self::create_openvpn_cmd( tunnel_endpoint.to_endpoint(), tunnel_alias, @@ -249,7 +249,7 @@ impl TunnelMonitor { } } - fn create_user_pass_file(account_token: &str) -> io::Result<mktemp::TempFile> { + fn create_user_pass_file(username: &str) -> io::Result<mktemp::TempFile> { let temp_file = mktemp::TempFile::new(); debug!( "Writing user-pass credentials to {}", @@ -257,7 +257,7 @@ impl TunnelMonitor { ); let mut file = fs::File::create(&temp_file)?; Self::set_user_pass_file_permissions(&file)?; - write!(file, "{}\n-\n", account_token)?; + write!(file, "{}\n-\n", username)?; Ok(temp_file) } |
