diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-07-18 20:20:38 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-07-19 14:53:24 +0200 |
| commit | 5debb39be683a7b17efc0bae7066c82988576b99 (patch) | |
| tree | 7eb45d5211ecfee7e8a6711d43a7bef478f0612c /talpid-openvpn-plugin/src/processing.rs | |
| parent | 3ed79a04900596968495303e068b9e80ef73bbbe (diff) | |
| download | mullvadvpn-5debb39be683a7b17efc0bae7066c82988576b99.tar.xz mullvadvpn-5debb39be683a7b17efc0bae7066c82988576b99.zip | |
Update openvpn plugin to use openvpn-plugin lib
Diffstat (limited to 'talpid-openvpn-plugin/src/processing.rs')
| -rw-r--r-- | talpid-openvpn-plugin/src/processing.rs | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/talpid-openvpn-plugin/src/processing.rs b/talpid-openvpn-plugin/src/processing.rs index e33097c633..5f3c8e4afd 100644 --- a/talpid-openvpn-plugin/src/processing.rs +++ b/talpid-openvpn-plugin/src/processing.rs @@ -1,5 +1,5 @@ -use openvpn_ffi; - +use openvpn_plugin; +use std::collections::HashMap; use talpid_ipc::{IpcServerId, WsIpcClient}; error_chain! { @@ -18,14 +18,14 @@ pub struct EventProcessor { impl EventProcessor { pub fn new(server_id: IpcServerId) -> Result<EventProcessor> { - debug!("Creating EventProcessor"); + trace!("Creating EventProcessor"); let ipc_client = WsIpcClient::new(server_id).chain_err(|| "Unable to create IPC client")?; Ok(EventProcessor { ipc_client }) } pub fn process_event(&mut self, - event: openvpn_ffi::OpenVpnPluginEvent, - env: openvpn_ffi::OpenVpnEnv) + event: openvpn_plugin::types::OpenVpnPluginEvent, + env: HashMap<String, String>) -> Result<()> { trace!("Processing \"{:?}\" event", event); self.ipc_client @@ -34,10 +34,3 @@ impl EventProcessor { .chain_err(|| ErrorKind::IpcSendingError) } } - -impl Drop for EventProcessor { - fn drop(&mut self) { - // TODO(linus): If we need, this is where we send some shutdown event or similar to core. - debug!("Dropping EventProcessor"); - } -} |
