From df13f8e8c2199b572f19d295e5c59e7502204b3a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 20 May 2014 10:32:23 +0200 Subject: 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. --- lib/openldap.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lib/openldap.c') 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, - * Copyright (C) 2011 - 2013, Daniel Stenberg, , et al. + * Copyright (C) 2011 - 2014, Daniel Stenberg, , 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 @@ -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); -- cgit v1.2.1