From b23484be720ac72a1a7e176813a179993d97f36e Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 13 Apr 2017 17:34:00 +0200 Subject: [PATCH] vpn: inline call_plugin_disconnect() There is only one caller. Don't bother moving the logic to a separate function. --- src/vpn/nm-vpn-connection.c | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c index ac86a7a96..4079195a0 100644 --- a/src/vpn/nm-vpn-connection.c +++ b/src/vpn/nm-vpn-connection.c @@ -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,8 +631,17 @@ _set_vpn_state (NMVpnConnection *self, } /* Tear down and clean up the connection */ - if (priv->proxy) - 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: