diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-05-20 10:32:23 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-05-22 00:34:10 +0200 |
commit | df13f8e8c2199b572f19d295e5c59e7502204b3a (patch) | |
tree | b664dc79f3de9d810f13dd01decbd0b03fcb06b5 /lib/openldap.c | |
parent | 491767418bd3e69867d48c2f9b4ea58f7112a879 (diff) | |
download | curl-df13f8e8c2199b572f19d295e5c59e7502204b3a.tar.gz |
bits.close: introduce connection close tracking
Make all code use connclose() and connkeep() when changing the "close
state" for a connection. These two macros take a string argument with an
explanation, and debug builds of curl will include that in the debug
output. Helps tracking connection re-use/close issues.
Diffstat (limited to 'lib/openldap.c')
-rw-r--r-- | lib/openldap.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/openldap.c b/lib/openldap.c index 2af14bab1..df8d93889 100644 --- a/lib/openldap.c +++ b/lib/openldap.c @@ -6,7 +6,7 @@ * \___|\___/|_| \_\_____| * * Copyright (C) 2010, 2013, Howard Chu, <hyc@openldap.org> - * Copyright (C) 2011 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2011 - 2014, 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 @@ -46,6 +46,7 @@ #include "curl_ldap.h" #include "curl_memory.h" #include "curl_base64.h" +#include "connect.h" #define _MPRINTF_REPLACE /* use our functions only */ #include <curl/mprintf.h> @@ -175,7 +176,7 @@ static CURLcode ldap_setup(struct connectdata *conn) return CURLE_OUT_OF_MEMORY; li->proto = proto; conn->proto.generic = li; - conn->bits.close = FALSE; + connkeep(conn, "OpenLDAP default"); /* TODO: * - provide option to choose SASL Binds instead of Simple */ @@ -349,7 +350,7 @@ static CURLcode ldap_do(struct connectdata *conn, bool *done) int msgid; struct SessionHandle *data=conn->data; - conn->bits.close = FALSE; + connkeep(conn, "OpenLDAP do"); infof(data, "LDAP local: %s\n", data->change.url); |