[geary/wip/301-auth-errors] Fix SMTP auth errors when using IMAP credentials



commit f978b8d2132dae4be2fd0817d4ce2d0a45ccf935
Author: Michael Gratton <mike vee net>
Date:   Sat Mar 9 09:50:27 2019 +1100

    Fix SMTP auth errors when using IMAP credentials
    
    Default response for AccountInformation.load_outgoing_credentials (and
    for incoming) should be null in case there's no credentials, but also
    loading ougoing must load incoming when USE_INCOMING is set.
    
    Fixes SMTP side of #301

 src/engine/api/geary-account-information.vala | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/src/engine/api/geary-account-information.vala b/src/engine/api/geary-account-information.vala
index 89b83363..ea2df6d6 100644
--- a/src/engine/api/geary-account-information.vala
+++ b/src/engine/api/geary-account-information.vala
@@ -471,14 +471,14 @@ public class Geary.AccountInformation : BaseObject {
      * Credentials are loaded from the mediator, thus it may yield for
      * some time.
      *
-     * Returns true if the credentials were successfully loaded, or
-     * false if the credentials could not be loaded and the service's
-     * credentials are invalid.
+     * Returns true if the credentials were successfully loaded or are
+     * null, or false if the credentials could not be loaded and the
+     * service's credentials are invalid.
      */
     public async bool load_outgoing_credentials(GLib.Cancellable? cancellable)
         throws GLib.Error {
         Credentials? creds = this.outgoing.credentials;
-        bool loaded = false;
+        bool loaded = true;
         if (creds != null) {
             loaded = yield this.mediator.load_token(
                 this, this.outgoing, cancellable
@@ -493,14 +493,14 @@ public class Geary.AccountInformation : BaseObject {
      * Credentials are loaded from the mediator, thus it may yield for
      * some time.
      *
-     * Returns true if the credentials were successfully loaded, or
-     * false if the credentials could not be loaded and the service's
-     * credentials are invalid.
+     * Returns true if the credentials were successfully loaded or are
+     * null, or false if the credentials could not be loaded and the
+     * service's credentials are invalid.
      */
     public async bool load_incoming_credentials(GLib.Cancellable? cancellable)
         throws GLib.Error {
         Credentials? creds = this.incoming.credentials;
-        bool loaded = false;
+        bool loaded = true;
         if (creds != null) {
             loaded = yield this.mediator.load_token(
                 this, this.incoming, cancellable


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]