summary refs log tree commit diff
path: root/src/vpn/nm-vpn-connection.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2018-09-15 01:04:32 +0200
committerMichael Biebl <biebl@debian.org>2018-09-15 01:04:32 +0200
commitc240974325c552cad177c457d6ff04e381fd77a3 (patch)
tree2fe5561359b767db15292c84447be8075a75388a /src/vpn/nm-vpn-connection.c
parent8f7a3cbbdd0c0a48277c341dd3a8ec8743ae9735 (diff)
New upstream version 1.14.0 upstream/1.14.0
Diffstat (limited to 'src/vpn/nm-vpn-connection.c')
-rw-r--r--src/vpn/nm-vpn-connection.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c
index d1aaa7c9..bd847d75 100644
--- a/src/vpn/nm-vpn-connection.c
+++ b/src/vpn/nm-vpn-connection.c
@@ -2684,12 +2684,16 @@ plugin_interactive_secrets_required (NMVpnConnection *self,
 	gs_free const char **hints = NULL;
 	gs_free char *message_hint = NULL;
 
+	if (!NM_IN_SET (priv->vpn_state, STATE_CONNECT,
+	                                 STATE_NEED_AUTH)) {
+		_LOGD ("VPN plugin: requested secrets; state %s (%d); ignore request in current state",
+		       vpn_state_to_string (priv->vpn_state), priv->vpn_state);
+		return;
+	}
+
 	_LOGI ("VPN plugin: requested secrets; state %s (%d)",
 	       vpn_state_to_string (priv->vpn_state), priv->vpn_state);
 
-	g_return_if_fail (priv->vpn_state == STATE_CONNECT ||
-	                  priv->vpn_state == STATE_NEED_AUTH);
-
 	priv->secrets_idx = SECRETS_REQ_INTERACTIVE;
 	_set_vpn_state (self, STATE_NEED_AUTH, NM_ACTIVE_CONNECTION_STATE_REASON_NONE, FALSE);
 
@@ -2756,6 +2760,9 @@ dispose (GObject *object)
 	NMVpnConnection *self = NM_VPN_CONNECTION (object);
 	NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
 
+	if (priv->proxy)
+		g_signal_handlers_disconnect_by_data (priv->proxy, self);
+
 	nm_clear_g_source (&priv->start_timeout);
 
 	g_clear_pointer (&priv->connect_hash, g_variant_unref);