diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-10-18 13:09:39 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-10-18 14:38:56 +0200 |
| commit | 64d54367508d297e58c11bbcde573165c658b614 (patch) | |
| tree | fbd43d07ec30af2abb4dbf2fadd63047dbda332b | |
| parent | c6f15f80287f142e2af5f3b78faa4365e2f53cca (diff) | |
| download | mullvadvpn-64d54367508d297e58c11bbcde573165c658b614.tar.xz mullvadvpn-64d54367508d297e58c11bbcde573165c658b614.zip | |
Use "connection info" instead of address for RPC
| -rw-r--r-- | mullvad-daemon/src/rpc_info.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/mullvad-daemon/src/rpc_info.rs b/mullvad-daemon/src/rpc_info.rs index 7826b736a8..3bd42d9751 100644 --- a/mullvad-daemon/src/rpc_info.rs +++ b/mullvad-daemon/src/rpc_info.rs @@ -5,8 +5,8 @@ use std::path::{Path, PathBuf}; error_chain! { errors { WriteFailed(path: PathBuf) { - description("Failed to write RCP address to file") - display("Failed to write RPC address to {}", path.to_string_lossy()) + description("Failed to write RCP connection info to file") + display("Failed to write RPC connection info to {}", path.to_string_lossy()) } RemoveFailed(path: PathBuf) { description("Failed to remove file") @@ -17,18 +17,18 @@ error_chain! { #[cfg(unix)] lazy_static! { - /// The path to the file where we write the RPC address + /// The path to the file where we write the RPC connection info static ref RPC_ADDRESS_FILE_PATH: PathBuf = Path::new("/tmp").join(".mullvad_rpc_address"); } #[cfg(not(unix))] lazy_static! { - /// The path to the file where we write the RPC address + /// The path to the file where we write the RPC connection info static ref RPC_ADDRESS_FILE_PATH: PathBuf = ::std::env::temp_dir().join(".mullvad_rpc_address"); } -/// Writes down the RPC address to some API to a file. +/// Writes down the RPC connection info to some API to a file. pub fn write(rpc_address: &str, shared_secret: &str) -> Result<()> { open_file(RPC_ADDRESS_FILE_PATH.as_path()) .and_then(|mut file| { @@ -37,7 +37,7 @@ pub fn write(rpc_address: &str, shared_secret: &str) -> Result<()> { .chain_err(|| ErrorKind::WriteFailed(RPC_ADDRESS_FILE_PATH.to_owned()))?; debug!( - "Wrote RPC address to {}", + "Wrote RPC connection info to {}", RPC_ADDRESS_FILE_PATH.to_string_lossy() ); Ok(()) |
