diff --git a/src/shell-network-agent.c b/src/shell-network-agent.c index c6f4b79c5..8e8c54845 100644 --- a/src/shell-network-agent.c +++ b/src/shell-network-agent.c @@ -366,8 +366,6 @@ shell_network_agent_get_secrets (NMSecretAgent *agent, { ShellNetworkAgent *self = SHELL_NETWORK_AGENT (agent); ShellAgentRequest *request; - NMSettingConnection *setting_connection; - const char *connection_type; GHashTable *attributes; char *request_id; @@ -381,9 +379,6 @@ shell_network_agent_get_secrets (NMSecretAgent *agent, shell_agent_request_cancel (request); } - setting_connection = nm_connection_get_setting_connection (connection); - connection_type = nm_setting_connection_get_connection_type (setting_connection); - request = g_slice_new (ShellAgentRequest); request->self = g_object_ref (self); request->cancellable = g_cancellable_new (); @@ -393,7 +388,7 @@ shell_network_agent_get_secrets (NMSecretAgent *agent, request->flags = flags; request->callback = callback; request->callback_data = callback_data; - request->is_vpn = !strcmp(connection_type, NM_SETTING_VPN_SETTING_NAME); + request->is_vpn = !strcmp(setting_name, NM_SETTING_VPN_SETTING_NAME); request->entries = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, gvalue_destroy_notify); if (request->is_vpn)