[gnome-shell] NetworkAgent: correctly identify the VPN secret requests
- From: Lubomir Rintel <lkundrak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] NetworkAgent: correctly identify the VPN secret requests
- Date: Wed, 27 Jan 2016 12:38:23 +0000 (UTC)
commit 346ffd14d77f6a4aeabb2b89f76463c9a84d10ac
Author: Lubomir Rintel <lkundrak v3 sk>
Date: Tue Jan 26 17:31:34 2016 +0100
NetworkAgent: correctly identify the VPN secret requests
The non-interactive requests for 'vpn' settings are forwarded to the UI because
it is able to talk to the auth helpers. However, the VPN requests are identified
by the connection type instead of setting type. That is incorrect and the UI
is not prepared to handle such requests; tries to construct a dialog and fails
miserably:
Gjs-Message: JS LOG: Invalid connection type: vpn
(gnome-shell:13133): Gjs-WARNING **: JS ERROR: Error: No property 'text' in property list (or its value
was undefined)
NetworkSecretDialog< _init resource:///org/gnome/shell/ui/components/networkAgent.js:60
wrapper resource:///org/gnome/gjs/modules/lang.js:169
_Base prototype _construct resource:///org/gnome/gjs/modules/lang.js:110
Class.prototype._construct/newClass resource:///org/gnome/gjs/modules/lang.js:204
NetworkAgent< _handleRequest resource:///org/gnome/shell/ui/components/networkAgent.js:724
wrapper resource:///org/gnome/gjs/modules/lang.js:169
NetworkAgent< _newRequest resource:///org/gnome/shell/ui/components/networkAgent.js:715
wrapper resource:///org/gnome/gjs/modules/lang.js:169
https://bugzilla.gnome.org/show_bug.cgi?id=760999
src/shell-network-agent.c | 7 +------
1 files changed, 1 insertions(+), 6 deletions(-)
---
diff --git a/src/shell-network-agent.c b/src/shell-network-agent.c
index da0f7e5..0fd028f 100644
--- a/src/shell-network-agent.c
+++ b/src/shell-network-agent.c
@@ -363,8 +363,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;
@@ -378,9 +376,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 ();
@@ -390,7 +385,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)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]