diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-03-05 16:01:37 +0100 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-03-05 16:01:37 +0100 |
| commit | 42db9a40577adba692ee82a7ccb6a745f4c5cbf1 (patch) | |
| tree | 21b6a24ce4b2fff0d635bcb3b6a1c6d55a231c92 | |
| parent | eb64d9a6a23fe613141810233594df5c4a8bd999 (diff) | |
| download | mullvadvpn-42db9a40577adba692ee82a7ccb6a745f4c5cbf1.tar.xz mullvadvpn-42db9a40577adba692ee82a7ccb6a745f4c5cbf1.zip | |
Don't take ownership of Error
| -rw-r--r-- | talpid_openvpn_plugin/src/lib.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/talpid_openvpn_plugin/src/lib.rs b/talpid_openvpn_plugin/src/lib.rs index 193bcf83c3..782fa59a6f 100644 --- a/talpid_openvpn_plugin/src/lib.rs +++ b/talpid_openvpn_plugin/src/lib.rs @@ -57,7 +57,7 @@ pub extern "C" fn openvpn_plugin_open_v3(_version: c_int, match openvpn_plugin_open_v3_internal(retptr) { Ok(_) => ffi::OPENVPN_PLUGIN_FUNC_SUCCESS, Err(e) => { - log_error("Unable to initialize plugin", e); + log_error("Unable to initialize plugin", &e); ffi::OPENVPN_PLUGIN_FUNC_ERROR } } @@ -98,7 +98,7 @@ pub extern "C" fn openvpn_plugin_func_v3(_version: c_int, match openvpn_plugin_func_v3_internal(args) { Ok(_) => ffi::OPENVPN_PLUGIN_FUNC_SUCCESS, Err(e) => { - log_error("Error while processing event", e); + log_error("Error while processing event", &e); ffi::OPENVPN_PLUGIN_FUNC_ERROR } } @@ -130,7 +130,7 @@ pub fn init_logger() -> ::std::result::Result<(), ()> { }) } -pub fn log_error(msg: &str, error: Error) { +pub fn log_error(msg: &str, error: &Error) { error!("{}", msg); for e in error.iter() { error!("caused by: {}", e); |
