[balsa/52-fix-clang-9-fails] imap-handle: Do not confuse Imap* enums
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/52-fix-clang-9-fails] imap-handle: Do not confuse Imap* enums
- Date: Mon, 11 Jan 2021 23:04:16 +0000 (UTC)
commit eaa8b28a95cb004d061be2d9e3b3f0036ffe3bfb
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Mon Jan 11 17:58:23 2021 -0500
imap-handle: Do not confuse Imap* enums
Do not confuse ImapResult and ImapResponse enums. Possible fix for
https://gitlab.gnome.org/GNOME/balsa/-/issues/51
libbalsa/imap/imap-handle.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/libbalsa/imap/imap-handle.c b/libbalsa/imap/imap-handle.c
index 5f112f090..eb045d9a7 100644
--- a/libbalsa/imap/imap-handle.c
+++ b/libbalsa/imap/imap-handle.c
@@ -649,6 +649,7 @@ imap_timeout_cb(void *arg)
static ImapResult
imap_mbox_connect(ImapMboxHandle* handle)
{
+ ImapResult retval;
ImapResponse resp;
GError *error = NULL;
@@ -697,20 +698,20 @@ imap_mbox_connect(ImapMboxHandle* handle)
(strncmp(handle->last_msg, "Microsoft Exchange", 18) != 0);
if((handle->tls_mode == NET_CLIENT_CRYPT_ENCRYPTED) ||
(handle->tls_mode == NET_CLIENT_CRYPT_NONE)) {
- resp = IMAP_SUCCESS; /* secured already with SSL, or no encryption requested */
+ retval = IMAP_SUCCESS; /* secured already with SSL, or no encryption requested */
} else if(imap_mbox_handle_can_do(handle, IMCAP_STARTTLS)) {
if( imap_handle_starttls(handle, &error) != IMR_OK) {
imap_mbox_handle_set_msg(handle, _("TLS negotiation failed: %s"), error_safe(error));
- resp = IMAP_UNSECURE; /* TLS negotiation error */
+ retval = IMAP_UNSECURE; /* TLS negotiation error */
} else {
- resp = IMAP_SUCCESS; /* secured with TLS */
+ retval = IMAP_SUCCESS; /* secured with TLS */
}
} else {
imap_mbox_handle_set_msg(handle, _("TLS required but not available"));
- resp = IMR_NO; /* TLS unavailable */
+ retval = IMAP_AUTH_UNAVAIL; /* TLS unavailable */
}
- return resp;
+ return retval;
}
unsigned
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]