diff mbox series

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

Message ID patch-v2-1.6-3187a643035-20230202T093706Z-avarab@gmail.com (mailing list archive)
State New, archived
Headers show
Series imap-send: replace auto-probe libcurl with hard dependency | expand

Commit Message

Ævar Arnfjörð Bjarmason Feb. 2, 2023, 9:44 a.m. UTC
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 <avarab@gmail.com>
---
 imap-send.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Junio C Hamano Feb. 2, 2023, 7:11 p.m. UTC | #1
Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> 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.

Obviously correct ;-).
diff mbox series

Patch

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 {