diff options
author | Thomas Haller <thaller@redhat.com> | 2017-04-13 17:34:00 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2017-04-13 17:37:06 +0200 |
commit | e0bb74b8b5cd9f44fd3d0b45b7debda0303615c1 (patch) | |
tree | b3ea359a21dd7cac18effcad11805204869d6ee2 | |
parent | 5879625127c847e7b6ee4005f5712507f516eb2b (diff) | |
download | NetworkManager-th/vpn-disconnect-rh1442064.tar.gz |
vpn: inline call_plugin_disconnect()th/vpn-disconnect-rh1442064
There is only one caller. Don't bother moving the logic to a separate
function.
-rw-r--r-- | src/vpn/nm-vpn-connection.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c index ac86a7a96d..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,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: |