[gnome-online-accounts] exchange, lastfm: Update the ret variable only when everything is done
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts] exchange, lastfm: Update the ret variable only when everything is done
- Date: Fri, 22 Jan 2016 17:35:38 +0000 (UTC)
commit 6f908cae30289cf594e9e3cd2a149c73bab2f921
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Jan 22 16:08:48 2016 +0100
exchange, lastfm: Update the ret variable only when everything is done
https://bugzilla.gnome.org/show_bug.cgi?id=760991
src/goabackend/goaexchangeprovider.c | 21 +++++++++++----------
src/goabackend/goalastfmprovider.c | 3 +--
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/goabackend/goaexchangeprovider.c b/src/goabackend/goaexchangeprovider.c
index 4ad96eb..fcf7d2f 100644
--- a/src/goabackend/goaexchangeprovider.c
+++ b/src/goabackend/goaexchangeprovider.c
@@ -1,6 +1,6 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/*
- * Copyright (C) 2012, 2013, 2014, 2015 Red Hat, Inc.
+ * Copyright (C) 2012, 2013, 2014, 2015, 2016 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -300,15 +300,14 @@ ensure_credentials_sync (GoaProvider *provider,
server = goa_exchange_get_host (exchange);
ews_client = goa_ews_client_new ();
- ret = goa_ews_client_autodiscover_sync (ews_client,
- email_address,
- password,
- username,
- server,
- accept_ssl_errors,
- cancellable,
- error);
- if (!ret)
+ if (!goa_ews_client_autodiscover_sync (ews_client,
+ email_address,
+ password,
+ username,
+ server,
+ accept_ssl_errors,
+ cancellable,
+ error))
{
if (error != NULL)
{
@@ -330,6 +329,8 @@ ensure_credentials_sync (GoaProvider *provider,
if (out_expires_in != NULL)
*out_expires_in = 0;
+ ret = TRUE;
+
out:
if (ews_client != NULL)
g_object_unref (ews_client);
diff --git a/src/goabackend/goalastfmprovider.c b/src/goabackend/goalastfmprovider.c
index 7ad5bae..aa3945f 100644
--- a/src/goabackend/goalastfmprovider.c
+++ b/src/goabackend/goalastfmprovider.c
@@ -268,8 +268,7 @@ ensure_credentials_sync (GoaProvider *provider,
goto out;
}
- ret = lastfm_login_sync (provider, username, password, error);
- if (!ret)
+ if (!lastfm_login_sync (provider, username, password, error))
{
if (error != NULL)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]