mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-08 22:58:16 +02:00
vpn: inline call_plugin_disconnect()
There is only one caller. Don't bother moving the logic to a separate
function.
(cherry picked from commit b23484be72)
This commit is contained in:
parent
e6b1a31106
commit
6bfd9b4e85
1 changed files with 11 additions and 17 deletions
|
|
@ -358,21 +358,6 @@ disconnect_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_data)
|
||||||
g_object_unref (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
|
static void
|
||||||
fw_call_cleanup (NMVpnConnection *self)
|
fw_call_cleanup (NMVpnConnection *self)
|
||||||
{
|
{
|
||||||
|
|
@ -646,8 +631,17 @@ _set_vpn_state (NMVpnConnection *self,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tear down and clean up the connection */
|
/* Tear down and clean up the connection */
|
||||||
if (priv->proxy)
|
if (priv->proxy) {
|
||||||
call_plugin_disconnect (self);
|
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);
|
vpn_cleanup (self, parent_dev);
|
||||||
/* fall through */
|
/* fall through */
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue