summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2017-03-11 15:47:34 +0100
committerLubomir Rintel <lkundrak@v3.sk>2017-03-17 10:21:19 +0100
commitd9d78ac2aa9c3e84d8144fb3a648499b9282aeb7 (patch)
treebaad7af78224c2ea60e9b8d00550719eb955d702
parentc61c16513e6ae55b4d3cd88a3459ab42ba231712 (diff)
downloadNetworkManager-d9d78ac2aa9c3e84d8144fb3a648499b9282aeb7.tar.gz
vpn-connection: drop reason_to_string
It's utterly useless: the textual version of the reason if logged only if the plugin fails; but the plugin failure already logs the plugin state change reason which is directly translated to the connection one.
-rw-r--r--src/vpn/nm-vpn-connection.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/src/vpn/nm-vpn-connection.c b/src/vpn/nm-vpn-connection.c
index d05079cac7..49b17086a3 100644
--- a/src/vpn/nm-vpn-connection.c
+++ b/src/vpn/nm-vpn-connection.c
@@ -885,23 +885,6 @@ NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_vpn_state_to_string, VpnState,
);
#define vpn_state_to_string(state) NM_UTILS_LOOKUP_STR (_vpn_state_to_string, state)
-NM_UTILS_LOOKUP_STR_DEFINE_STATIC (_vpn_reason_to_string, NMVpnConnectionStateReason,
- NM_UTILS_LOOKUP_DEFAULT (NULL),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_UNKNOWN, "unknown"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_NONE, "none"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_USER_DISCONNECTED, "user-disconnected"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_DEVICE_DISCONNECTED, "device-disconnected"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_SERVICE_STOPPED, "service-stopped"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_IP_CONFIG_INVALID, "ip-config-invalid"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_CONNECT_TIMEOUT, "connect-timeout"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_TIMEOUT, "service-start-timeout"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_SERVICE_START_FAILED, "service-start-failed"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_NO_SECRETS, "no-secrets"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_LOGIN_FAILED, "login-failed"),
- NM_UTILS_LOOKUP_STR_ITEM (NM_VPN_CONNECTION_STATE_REASON_CONNECTION_REMOVED, "connection-removed"),
-);
-#define vpn_reason_to_string(reason) NM_UTILS_LOOKUP_STR (_vpn_reason_to_string, reason)
-
static void
plugin_state_changed (NMVpnConnection *self, NMVpnServiceState new_service_state)
{
@@ -921,8 +904,6 @@ plugin_state_changed (NMVpnConnection *self, NMVpnServiceState new_service_state
if ((priv->vpn_state >= STATE_WAITING) && (priv->vpn_state <= STATE_ACTIVATED)) {
VpnState old_state = priv->vpn_state;
- _LOGI ("VPN plugin: state change reason: %s (%d)",
- vpn_reason_to_string (priv->failure_reason), priv->failure_reason);
_set_vpn_state (self, STATE_FAILED, priv->failure_reason, FALSE);
/* Reset the failure reason */