diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-10-13 18:08:06 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-10-13 19:02:40 +0200 |
| commit | 5becaef6f7b796bba6b5245f1245ce1f38a3c538 (patch) | |
| tree | a3c1d60424f463c600b6064e5f4c7d4d5dcc72a1 | |
| parent | 69ac056634446b75f870dfd58413c181cc54e1a8 (diff) | |
| download | mullvadvpn-5becaef6f7b796bba6b5245f1245ce1f38a3c538.tar.xz mullvadvpn-5becaef6f7b796bba6b5245f1245ce1f38a3c538.zip | |
Upgrade to use openvpn-plugin 0.3.0
| -rw-r--r-- | talpid-core/Cargo.toml | 2 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/Cargo.toml | 2 | ||||
| -rw-r--r-- | talpid-openvpn-plugin/src/lib.rs | 12 |
3 files changed, 8 insertions, 8 deletions
diff --git a/talpid-core/Cargo.toml b/talpid-core/Cargo.toml index a5073bce4a..20a67b912b 100644 --- a/talpid-core/Cargo.toml +++ b/talpid-core/Cargo.toml @@ -14,7 +14,7 @@ lazy_static = "0.2" log = "0.3" uuid = { version = "0.5", features = ["v4"] } -openvpn-plugin = { version = "0.2", features = ["serialize"] } +openvpn-plugin = { version = "0.3", features = ["serde"] } talpid-ipc = { path = "../talpid-ipc" } talpid-types = { path = "../talpid-types" } diff --git a/talpid-openvpn-plugin/Cargo.toml b/talpid-openvpn-plugin/Cargo.toml index 65dac3133d..4b3a11b432 100644 --- a/talpid-openvpn-plugin/Cargo.toml +++ b/talpid-openvpn-plugin/Cargo.toml @@ -13,5 +13,5 @@ error-chain = "0.11" log = "0.3" env_logger = "0.4" -openvpn-plugin = { version = "0.2", features = ["serialize", "log"] } +openvpn-plugin = { version = "0.3", features = ["serde", "log"] } talpid-ipc = { path = "../talpid-ipc" } diff --git a/talpid-openvpn-plugin/src/lib.rs b/talpid-openvpn-plugin/src/lib.rs index 5212c83161..4449814e31 100644 --- a/talpid-openvpn-plugin/src/lib.rs +++ b/talpid-openvpn-plugin/src/lib.rs @@ -58,13 +58,13 @@ openvpn_plugin!( ); fn openvpn_open( - args: &[CString], - _env: &HashMap<CString, CString>, + args: Vec<CString>, + _env: HashMap<CString, CString>, ) -> Result<(Vec<OpenVpnPluginEvent>, EventProcessor)> { env_logger::init().chain_err(|| "Failed to bootstrap logging system")?; debug!("Initializing plugin"); - let core_server_id = parse_args(args)?; + let core_server_id = parse_args(&args)?; info!("Connecting back to talpid core at {}", core_server_id); let processor = EventProcessor::new(core_server_id).chain_err(|| ErrorKind::InitHandleFailed)?; @@ -89,14 +89,14 @@ fn openvpn_close(_handle: EventProcessor) { fn openvpn_event( event: OpenVpnPluginEvent, - _args: &[CString], - env: &HashMap<CString, CString>, + _args: Vec<CString>, + env: HashMap<CString, CString>, handle: &mut EventProcessor, ) -> Result<EventResult> { debug!("Received event: {:?}", event); let parsed_env = - openvpn_plugin::ffi::parse::env_utf8(env).chain_err(|| ErrorKind::ParseEnvFailed)?; + openvpn_plugin::ffi::parse::env_utf8(&env).chain_err(|| ErrorKind::ParseEnvFailed)?; handle .process_event(event, parsed_env) |
