[gnome-shell/wip/smartcard: 7/16] authPrompt: cancel user verification if verifying when reset
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/smartcard: 7/16] authPrompt: cancel user verification if verifying when reset
- Date: Mon, 29 Jul 2013 21:37:02 +0000 (UTC)
commit a44e9118f0313bb538415e376b88944ba31ca1e4
Author: Ray Strode <rstrode redhat com>
Date: Mon Jul 29 08:46:37 2013 -0400
authPrompt: cancel user verification if verifying when reset
authPrompt.reset() currently only leaves the authPrompt in a
sane state if the user isn't verifying.
This commit makes sure to cancel verification if a reset happens
while verification is in process.
js/gdm/authPrompt.js | 12 ++++++++----
1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/gdm/authPrompt.js b/js/gdm/authPrompt.js
index e1a1c90..db64c68 100644
--- a/js/gdm/authPrompt.js
+++ b/js/gdm/authPrompt.js
@@ -232,8 +232,10 @@ const AuthPrompt = new Lang.Class({
},
_onReset: function() {
- if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED)
+ if (this.verificationStatus != AuthPromptStatus.VERIFICATION_SUCCEEDED) {
+ this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
this.reset();
+ }
},
_onShowLoginHint: function(verifier, message) {
@@ -405,7 +407,12 @@ const AuthPrompt = new Lang.Class({
},
reset: function() {
+ let oldStatus = this.verificationStatus;
this.verificationStatus = AuthPromptStatus.NOT_VERIFYING;
+
+ if (oldStatus == AuthPromptStatus.VERIFYING)
+ this._userVerifier.cancel();
+
this._queryingService = null;
this.clear();
this._message.opacity = 0;
@@ -452,9 +459,6 @@ const AuthPrompt = new Lang.Class({
},
cancel: function() {
- if (this.verificationStatus == AuthPromptStatus.VERIFYING)
- this._userVerifier.cancel();
-
this.reset();
}
});
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]