[gnome-software/gnome-3-22] ubuntu-reviews: Check OAuth token is valid before trying to use it
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/gnome-3-22] ubuntu-reviews: Check OAuth token is valid before trying to use it
- Date: Mon, 7 Nov 2016 03:01:46 +0000 (UTC)
commit 11e2e876d96654168f76dff3bbb6c69e1e7832a5
Author: Robert Ancell <robert ancell canonical com>
Date: Fri Sep 9 16:36:38 2016 +1200
ubuntu-reviews: Check OAuth token is valid before trying to use it
src/plugins/gs-plugin-ubuntu-reviews.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/plugins/gs-plugin-ubuntu-reviews.c b/src/plugins/gs-plugin-ubuntu-reviews.c
index f02fb9d..f4be0be 100644
--- a/src/plugins/gs-plugin-ubuntu-reviews.c
+++ b/src/plugins/gs-plugin-ubuntu-reviews.c
@@ -319,7 +319,7 @@ get_ubuntuone_token (GsPlugin *plugin,
*consumer_secret = g_strdup (gs_auth_get_metadata_item (auth, "consumer-secret"));
*token_key = g_strdup (gs_auth_get_metadata_item (auth, "token-key"));
*token_secret = g_strdup (gs_auth_get_metadata_item (auth, "token-secret"));
- return TRUE;
+ return *consumer_key != NULL && *consumer_secret != NULL && *token_key != NULL && *token_secret !=
NULL;
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]