aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2015-01-03 21:12:56 +0000
committerSteve Holme <steve_holme@hotmail.com>2015-01-04 16:21:13 +0000
commit5359936d07fee01ba832d251891c659f8c9bf7ca (patch)
tree7226c14fb726237a25a42c4e1dfea20b28286c6c
parentea4f98dca6630f5667dbe2ab045c68bbace7cdc1 (diff)
ldap: Fixed DN variable warnings when Unicode is enabled
Use 'TCHAR *' for local DN variable rather than 'char *'.
-rw-r--r--lib/ldap.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ldap.c b/lib/ldap.c
index fc027f786..7e9ac8935 100644
--- a/lib/ldap.c
+++ b/lib/ldap.c
@@ -430,8 +430,14 @@ static CURLcode Curl_ldap(struct connectdata *conn, bool *done)
/* Get the DN and write it to the client */
{
+#if defined(CURL_LDAP_WIN) && \
+ (defined(USE_WIN32_IDN) || defined(USE_WINDOWS_SSPI))
+ TCHAR *dn = ldap_get_dn(server, entryIterator);
+ size_t dn_len = _tcslen(dn);
+#else
char *dn = ldap_get_dn(server, entryIterator);
size_t dn_len = strlen(dn);
+#endif
result = Curl_client_write(conn, CLIENTWRITE_BODY, (char *)"DN: ", 4);
if(result) {