From e13f0237774964abeb690c25b6d52ee5db77935c Mon Sep 17 00:00:00 2001 From: Viktor Szakats Date: Tue, 9 Oct 2018 15:05:35 +0000 Subject: ldap: show precise LDAP call in error message on Windows Also add a unique but common text ('bind via') to make it easy to grep this specific failure regardless of platform. Ref: https://github.com/curl/curl/pull/878/files#diff-7a636f08047c4edb53a240f540b4ecf6R468 Closes https://github.com/curl/curl/pull/3118 Reviewed-by: Daniel Stenberg Reviewed-by: Marcel Raad --- lib/ldap.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/ldap.c b/lib/ldap.c index e42d1fbbc..ceaa71d08 100644 --- a/lib/ldap.c +++ b/lib/ldap.c @@ -474,7 +474,13 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done) #endif } if(rc != 0) { - failf(data, "LDAP local: ldap_simple_bind_s %s", ldap_err2string(rc)); +#ifdef USE_WIN32_LDAP + failf(data, "LDAP local: bind via ldap_win_bind %s", + ldap_err2string(rc)); +#else + failf(data, "LDAP local: bind via ldap_simple_bind_s %s", + ldap_err2string(rc)); +#endif result = CURLE_LDAP_CANNOT_BIND; goto quit; } -- cgit v1.2.3