[network-manager-applet: 3/8] libnma: use setting name from request to fill wifi dialog fields



commit 3214d70d48c5939f6178e47606b0e8538cc8e8a1
Author: Andrew Zaborowski <andrew zaborowski intel com>
Date:   Mon Sep 3 06:36:41 2018 +0200

    libnma: use setting name from request to fill wifi dialog fields
    
    Use the setting name given by NM in the agent request to request current
    values of secrets we will be letting the user edit in the wifi dialogs,
    if provided.

 src/libnma/nma-wifi-dialog.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
---
diff --git a/src/libnma/nma-wifi-dialog.c b/src/libnma/nma-wifi-dialog.c
index c4dca8f1..297e950e 100644
--- a/src/libnma/nma-wifi-dialog.c
+++ b/src/libnma/nma-wifi-dialog.c
@@ -997,7 +997,14 @@ security_combo_init (NMAWifiDialog *self, gboolean secrets_only,
         * will already be populated with secrets.  If no connection was given,
         * then we need to get any existing secrets to populate the dialog with.
         */
-       setting_name = priv->connection ? nm_connection_need_secrets (priv->connection, NULL) : NULL;
+       if (priv->connection) {
+               if (secrets_setting_name)
+                       setting_name = secrets_setting_name;
+               else
+                       setting_name = nm_connection_need_secrets (priv->connection, NULL);
+       } else
+               setting_name = NULL;
+
        if (setting_name && NM_IS_REMOTE_CONNECTION (priv->connection)) {
                GetSecretsInfo *info;
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]