summaryrefslogtreecommitdiff
path: root/lib/openldap.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2013-01-17 12:59:23 +0100
committerDaniel Stenberg <daniel@haxx.se>2013-01-17 19:40:35 +0100
commitc43127414d89ccb9ef6517081f68986d991bcfb3 (patch)
treef6a639061f5e199089a923b052904aa24901243c /lib/openldap.c
parent9fd88abb7032346e88636165e688232e36f5c336 (diff)
downloadcurl-c43127414d89ccb9ef6517081f68986d991bcfb3.tar.gz
always-multi: always use non-blocking internals
Remove internal separated behavior of the easy vs multi intercace. curl_easy_perform() is now using the multi interface itself. Several minor multi interface quirks and bugs have been fixed in the process. Much help with debugging this has been provided by: Yang Tse
Diffstat (limited to 'lib/openldap.c')
-rw-r--r--lib/openldap.c25
1 files changed, 6 insertions, 19 deletions
diff --git a/lib/openldap.c b/lib/openldap.c
index 4c395fadc..cb3b42020 100644
--- a/lib/openldap.c
+++ b/lib/openldap.c
@@ -6,7 +6,7 @@
* \___|\___/|_| \_\_____|
*
* Copyright (C) 2010, Howard Chu, <hyc@openldap.org>
- * Copyright (C) 2011 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 2011 - 2013, 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
@@ -192,6 +192,7 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
struct SessionHandle *data=conn->data;
int rc, proto = LDAP_VERSION3;
char hosturl[1024], *ptr;
+ (void)done;
strcpy(hosturl, "ldap");
ptr = hosturl+4;
@@ -212,23 +213,12 @@ static CURLcode ldap_connect(struct connectdata *conn, bool *done)
#ifdef USE_SSL
if(conn->handler->flags & PROTOPT_SSL) {
CURLcode res;
- if(data->state.used_interface == Curl_if_easy) {
- res = Curl_ssl_connect(conn, FIRSTSOCKET);
- if(res)
- return res;
- li->ssldone = TRUE;
- }
- else {
- res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
- if(res)
- return res;
- }
+ res = Curl_ssl_connect_nonblocking(conn, FIRSTSOCKET, &li->ssldone);
+ if(res)
+ return res;
}
#endif
- if(data->state.used_interface == Curl_if_easy)
- return ldap_connecting(conn, done);
-
return CURLE_OK;
}
@@ -262,10 +252,7 @@ static CURLcode ldap_connecting(struct connectdata *conn, bool *done)
}
#endif
- if(data->state.used_interface == Curl_if_easy)
- tvp = NULL; /* let ldap_result block indefinitely */
- else
- tvp = &tv;
+ tvp = &tv;
retry:
if(!li->didbind) {