[gnome-online-accounts] pocket: Hide error on network changes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] pocket: Hide error on network changes
- Date: Wed, 12 Jul 2017 16:08:14 +0000 (UTC)
commit e74954348b5399064eba42ec1f108798c32e67d7
Author: Bastien Nocera <hadess hadess net>
Date: Wed Jul 5 12:12:38 2017 +0200
pocket: Hide error on network changes
The Pocket backend can only get to the identity information when
authorising a new account. As the identity is static, simply return an
error and goa will use the on-disk/cached identity instead.
https://bugzilla.gnome.org/show_bug.cgi?id=784512#c11
src/goabackend/goapocketprovider.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goapocketprovider.c b/src/goabackend/goapocketprovider.c
index 8e88ca8..8356b02 100644
--- a/src/goabackend/goapocketprovider.c
+++ b/src/goabackend/goapocketprovider.c
@@ -271,6 +271,8 @@ get_identity_sync (GoaOAuth2Provider *oauth2_provider,
GoaPocketProvider *self = GOA_POCKET_PROVIDER (oauth2_provider);
if (out_presentation_identity != NULL)
*out_presentation_identity = g_strdup (self->identity);
+ if (!self->identity)
+ g_set_error (error, GOA_ERROR, GOA_ERROR_FAILED, "Identity is saved to disk already");
return g_strdup (self->identity);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]