[Dextrose] [sugar PATCH] au#1305: Use cached secrets; do not re-prompt the user to enter the (same) credentials.

Ajay Garg ajay at activitycentral.com
Sun Jun 24 06:58:24 EDT 2012


NM may request the secrets in the following cases ::

a)
Wifi connection is lost.

b)
After being lost, the wifi connection is again within the range.

c)
When the credentials for the wifi network change.


Supposedly, for every case, the "request_new" parameter is True.
Thus, in all the above cases, we would get the irritating the dialog-box.


Ideally, "request_new" should be True, only for case c).
However, case c) is rare (and when it does happens, usually the system-administrator, or the like,
has the responsibility for issuing the changes publically).

Thus, due to case c) (which is rare), cases a) and b) were suffering (these cases are generally
very plausible cases in everyday life).


So now, the intended solution is :::


1.
Always return the cached secrets.
This would make the irritating dialog-box go away, for cases a) and b).


2.
For case c), the user would ::

    (i)   "Discard Network History".
    (ii)  Click on the wifi icon (in the neighborhood-view).
    (iii) Enter the new (publically broadcasted) credentials.




 src/jarabe/model/network.py |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/src/jarabe/model/network.py b/src/jarabe/model/network.py
index 236c2ba..937eeea 100644
--- a/src/jarabe/model/network.py
+++ b/src/jarabe/model/network.py
@@ -692,9 +692,7 @@ class NMSettingsConnection(dbus.service.Object):
         logging.debug('Secrets requested for connection %s request_new=%s',
                       self.path, request_new)
         if self._settings.connection.type is not NM_CONNECTION_TYPE_GSM:
-            if request_new or self._secrets is None:
-                # request_new is for example the case when the pw on the AP
-                # changes
+            if self._secrets is None:
                 response = SecretsResponse(self, reply, error)
                 try:
                     self.secrets_request.send(self, response=response)
-- 
1.7.4.4



More information about the Dextrose mailing list