summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-04-15 00:31:34 +0200
committerThomas Haller <thaller@redhat.com>2017-04-15 00:31:34 +0200
commit6e67f7f30bb68733f7d1ec65aa64b6d72f064a49 (patch)
tree9a8261698630d3911b28f5791c8369600623edf6
parent67d144dd1e538cc753cbb581927f4b101726f271 (diff)
parentb23484be720ac72a1a7e176813a179993d97f36e (diff)
downloadNetworkManager-6e67f7f30bb68733f7d1ec65aa64b6d72f064a49.tar.gz
vpn: merge branch 'th/vpn-disconnect-rh1442064'
https://bugzilla.redhat.com/show_bug.cgi?id=1442064
-rw-r--r--src/vpn/nm-vpn-connection.c27
1 files changed, 11 insertions, 16 deletions
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c
index 464395dffa..4079195a09 100644
--- a/src/vpn/nm-vpn-connection.c
+++ b/src/vpn/nm-vpn-connection.c
@@ -359,21 +359,6 @@ disconnect_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
}
static void
-call_plugin_disconnect (NMVpnConnection *self)
-{
- NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
-
- g_dbus_proxy_call (priv->proxy,
- "Disconnect",
- NULL,
- G_DBUS_CALL_FLAGS_NONE,
- -1,
- priv->cancellable,
- (GAsyncReadyCallback) disconnect_cb,
- g_object_ref (self));
-}
-
-static void
fw_call_cleanup (NMVpnConnection *self)
{
NMVpnConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (self);
@@ -646,7 +631,17 @@ _set_vpn_state (NMVpnConnection *self,
}
/* Tear down and clean up the connection */
- call_plugin_disconnect (self);
+ if (priv->proxy) {
+ g_dbus_proxy_call (priv->proxy,
+ "Disconnect",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ -1,
+ priv->cancellable,
+ (GAsyncReadyCallback) disconnect_cb,
+ g_object_ref (self));
+ }
+
vpn_cleanup (self, parent_dev);
/* fall through */
default: