[network-manager-openvpn/lr/multiple-vpn] service: ensure the service is disconnected when doing a new connection
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [network-manager-openvpn/lr/multiple-vpn] service: ensure the service is disconnected when doing a new connection
- Date: Fri, 21 Aug 2015 18:18:59 +0000 (UTC)
commit a0172caf2f3976fece549493c53b013b5ccfc636
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Fri Aug 21 20:16:39 2015 +0200
service: ensure the service is disconnected when doing a new connection
mgt_path is not freed when an activation fails and Disconnect is not called,
let's do it upon reconnect otherwise the mgt_path == NULL assert will get git.
src/nm-openvpn-service.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/nm-openvpn-service.c b/src/nm-openvpn-service.c
index 607d9a9..08f3104 100644
--- a/src/nm-openvpn-service.c
+++ b/src/nm-openvpn-service.c
@@ -1581,6 +1581,11 @@ _connect_common (NMVpnServicePlugin *plugin,
const char *connection_type;
const char *user_name;
+ if (!real_disconnect (plugin, error)) {
+ g_warning ("Could not clean up previous daemon run: %s", (*error)->message);
+ g_clear_error (error);
+ }
+
s_vpn = nm_connection_get_setting_vpn (connection);
if (!s_vpn) {
g_set_error_literal (error,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]