summaryrefslogtreecommitdiffstats
path: root/lib/openldap.c
diff options
context:
space:
mode:
authorCurl Upstream <curl-library@cool.haxx.se>2019-05-22 05:48:44 (GMT)
committerBrad King <brad.king@kitware.com>2019-05-22 18:11:40 (GMT)
commitb26487c663ec29d972fd61adc2b14ac5880b78c7 (patch)
tree10220828b4a67af2a63ed9c6e8e4cb30160784ab /lib/openldap.c
parent9835e9075037db3d23ade0ef865c562b08cf6023 (diff)
downloadCMake-b26487c663ec29d972fd61adc2b14ac5880b78c7.zip
CMake-b26487c663ec29d972fd61adc2b14ac5880b78c7.tar.gz
CMake-b26487c663ec29d972fd61adc2b14ac5880b78c7.tar.bz2
curl 2019-05-22 (885ce314)
Code extracted from: https://github.com/curl/curl.git at commit 885ce31401b6789c959131754b1e5ae518964072 (curl-7_65_0).
Diffstat (limited to 'lib/openldap.c')
-rw-r--r--lib/openldap.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/openldap.c b/lib/openldap.c
index c6cb794..eeab2c7 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2018, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -196,9 +196,6 @@ static CURLcode ldap_setup_connection(struct connectdata *conn)
li->proto = proto;
conn->proto.generic = li;
connkeep(conn, "OpenLDAP default");
- /* TODO:
- * - provide option to choose SASL Binds instead of Simple
- */
return CURLE_OK;
}
@@ -220,8 +217,8 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
ptr = hosturl + 4;
if(conn->handler->flags & PROTOPT_SSL)
*ptr++ = 's';
- snprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d",
- conn->host.name, conn->remote_port);
+ msnprintf(ptr, sizeof(hosturl)-(ptr-hosturl), "://%s:%d",
+ conn->host.name, conn->remote_port);
#ifdef CURL_OPENLDAP_DEBUG
static int do_trace = 0;
@@ -414,7 +411,7 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done)
return CURLE_OUT_OF_MEMORY;
lr->msgid = msgid;
data->req.protop = lr;
- Curl_setup_transfer(conn, FIRSTSOCKET, -1, FALSE, NULL, -1, NULL);
+ Curl_setup_transfer(data, FIRSTSOCKET, -1, FALSE, -1);
*done = TRUE;
return CURLE_OK;
}
@@ -510,8 +507,6 @@ static ssize_t ldap_recv(struct connectdata *conn, int sockindex, char *buf,
lr->nument++;
rc = ldap_get_dn_ber(li->ld, ent, &ber, &bv);
if(rc < 0) {
- /* TODO: verify that this is really how this return code should be
- handled */
*err = CURLE_RECV_ERROR;
return -1;
}