[gnome-software] 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] ubuntu-reviews: Check OAuth token is valid before trying to use it
- Date: Fri, 9 Sep 2016 04:37:24 +0000 (UTC)
commit b8aa2a5c2c2e79e2a9f43370c40082fd228916cc
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]