Commit 6e67f7f3 authored by Thomas Haller's avatar Thomas Haller

vpn: merge branch 'th/vpn-disconnect-rh1442064'

https://bugzilla.redhat.com/show_bug.cgi?id=1442064
parents 67d144dd b23484be
......@@ -358,21 +358,6 @@ disconnect_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
g_object_unref (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)
{
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment