[gnome-online-accounts/gnome-3-20] identity: don't register new identity to list if sign in unsuccessful
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-20] identity: don't register new identity to list if sign in unsuccessful
- Date: Thu, 14 Jul 2016 18:56:38 +0000 (UTC)
commit 36b45366835b4846e47d723e77feb05a7a4ade5e
Author: Ray Strode <rstrode redhat com>
Date: Thu Jul 14 09:08:42 2016 -0400
identity: don't register new identity to list if sign in unsuccessful
If we add an identity to the list when sign in fails, then we're going
to prune it from the list immediately resulting in an identity-removed
signal right away. This will leads to an ensure credentials call
(which is needed in most cases on identity removal to synchronize state
with the daemon, but not in this case), which may cause it to sign
in again. This can lead to a sign in attempt every 5 seconds.
https://bugzilla.gnome.org/show_bug.cgi?id=768808
src/goaidentity/goakerberosidentitymanager.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/src/goaidentity/goakerberosidentitymanager.c b/src/goaidentity/goakerberosidentitymanager.c
index aa2656f..13f2a42 100644
--- a/src/goaidentity/goakerberosidentitymanager.c
+++ b/src/goaidentity/goakerberosidentitymanager.c
@@ -860,10 +860,6 @@ sign_in_identity (GoaKerberosIdentityManager *self,
g_object_ref (identity);
}
- g_hash_table_replace (self->priv->identities,
- g_strdup (operation->identifier),
- g_object_ref (identity));
-
if (!goa_kerberos_identity_sign_in (GOA_KERBEROS_IDENTITY (identity),
operation->identifier,
operation->initial_password,
@@ -888,6 +884,10 @@ sign_in_identity (GoaKerberosIdentityManager *self,
g_object_ref (identity),
(GDestroyNotify)
g_object_unref);
+
+ g_hash_table_replace (self->priv->identities,
+ g_strdup (operation->identifier),
+ g_object_ref (identity));
}
g_object_unref (identity);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]