[PATCH v2 1/6] imap-send: note "auth_method", not "host" on auth method failure

From
Ævar Arnfjörð Bjarmason <hidden>
Date
2023-02-02 09:45:17
Reply to
Ævar Arnfjörð Bjarmason, 2023-02-02
Fix error reporting added in ae9c606ed22 (imap-send: support CRAM-MD5
authentication, 2010-02-15), the use of "srvc->host" here was
seemingly copy/pasted from other uses added in the same commit.

But here we're complaining about the "auth_method" being incorrect, so
let's note it, and not the hostname.

In a subsequent commit we'll alter other uses of "host" here after
getting rid of the non-tunnel OpenSSL codepath. This preparatory fix
makes that subsequent change smaller.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 imap-send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imap-send.c b/imap-send.c
index a50af56b827..b7902babd4c 100644
--- a/imap-send.c
+++ b/imap-send.c
@@ -1121,7 +1121,7 @@ static struct imap_store *imap_open_store(struct imap_server_conf *srvc, const c
 					goto bail;
 				}
 			} else {
-				fprintf(stderr, "Unknown authentication method:%s\n", srvc->host);
+				fprintf(stderr, "Unknown authentication method:%s\n", srvc->auth_method);
 				goto bail;
 			}
 		} else {
-- 
2.39.1.1392.g63e6d408230
Thread (19 messages) 19 messages, 3 authors, last reply 2023-02-17
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help