[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 01/222: ldap: Stop using wide char version of ldapp_err2string
From: |
gnunet |
Subject: |
[gnurl] 01/222: ldap: Stop using wide char version of ldapp_err2string |
Date: |
Thu, 07 Nov 2019 00:08:17 +0100 |
This is an automated email from the git hooks/post-receive script.
ng0 pushed a commit to branch master
in repository gnurl.
commit 08f96982a910eb83e2be03a7db1305c8668f9668
Author: Jay Satiro <address@hidden>
AuthorDate: Tue Aug 27 14:20:20 2019 -0400
ldap: Stop using wide char version of ldapp_err2string
Despite ldapp_err2string being documented by MS as returning a
PCHAR (char *), when UNICODE it is mapped to ldap_err2stringW and
returns PWCHAR (wchar_t *).
We have lots of code that expects ldap_err2string to return char *,
most of it failf used like this:
failf(data, "LDAP local: Some error: %s", ldap_err2string(rc));
Closes https://github.com/curl/curl/pull/4272
---
lib/ldap.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/ldap.c b/lib/ldap.c
index fd31faa3e..d7d90fea7 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -119,6 +119,12 @@ static void _ldap_free_urldesc(LDAPURLDesc *ludp);
#define LDAP_TRACE(x) Curl_nop_stmt
#endif
+#if defined(USE_WIN32_LDAP) && defined(ldap_err2string)
+/* Use ansi error strings in UNICODE builds */
+#undef ldap_err2string
+#define ldap_err2string ldap_err2stringA
+#endif
+
static CURLcode Curl_ldap(struct connectdata *conn, bool *done);
--
To stop receiving notification emails like this one, please contact
address@hidden.
- [gnurl] branch master updated (3671d2089 -> 63b81ac1e), gnunet, 2019/11/06
- [gnurl] 04/222: asyn-thread: s/AF_LOCAL/AF_UNIX for Solaris, gnunet, 2019/11/06
- [gnurl] 03/222: winbuild/MakefileBuild.vc: Add vssh, gnunet, 2019/11/06
- [gnurl] 02/222: winbuild/MakefileBuild.vc: Fix line endings, gnunet, 2019/11/06
- [gnurl] 01/222: ldap: Stop using wide char version of ldapp_err2string,
gnunet <=
- [gnurl] 08/222: docs/HTTP3: fix `--with-ssl` ngtcp2 configure flag, gnunet, 2019/11/06
- [gnurl] 06/222: curlver: bump to 7.66.1, gnunet, 2019/11/06
- [gnurl] 05/222: setopt: make it easier to add new enum values, gnunet, 2019/11/06
- [gnurl] 11/222: parsedate: still provide the name arrays when disabled, gnunet, 2019/11/06
- [gnurl] 12/222: curl: fix memory leaked by parse_metalink(), gnunet, 2019/11/06
- [gnurl] 07/222: RELEASE-NOTES: synced, gnunet, 2019/11/06
- [gnurl] 13/222: FTP: skip CWD to entry dir when target is absolute, gnunet, 2019/11/06
- [gnurl] 10/222: curl:file2string: load large files much faster, gnunet, 2019/11/06
- [gnurl] 09/222: openssl: close_notify on the FTP data connection doesn't mean closure, gnunet, 2019/11/06
- [gnurl] 15/222: appveyor: add a winbuild, gnunet, 2019/11/06