X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Flookups%2Fldap.c;h=e2dbe51624b23e3ef3c04a87c6bcc84faef91e06;hb=7f83b348ccf4cd815e9758ab9ca1012e66324e9d;hp=ef550a08dcb3cc376954b05274ed66d289a91391;hpb=1e1ddfac79fbcd052f199500a6493c7f79cb8462;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/lookups/ldap.c b/src/src/lookups/ldap.c index ef550a08d..e2dbe5162 100644 --- a/src/src/lookups/ldap.c +++ b/src/src/lookups/ldap.c @@ -1288,8 +1288,6 @@ eldap_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_SINGLE, result, errmsg)); } @@ -1298,8 +1296,6 @@ eldapm_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_MULTIPLE, result, errmsg)); } @@ -1308,8 +1304,6 @@ eldapdn_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache, const uschar * opts) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_DN, result, errmsg)); } @@ -1317,8 +1311,6 @@ int eldapauth_find(void * handle, const uschar * filename, const uschar * ldap_url, int length, uschar ** result, uschar ** errmsg, uint * do_cache) { -/* Keep picky compilers happy */ -do_cache = do_cache; return(control_ldap_search(ldap_url, SEARCH_LDAP_AUTH, result, errmsg)); } @@ -1348,16 +1340,13 @@ Make sure that eldap_dn does not refer to reclaimed or worse, freed store */ static void eldap_tidy(void) { -LDAP_CONNECTION *lcp = NULL; eldap_dn = NULL; -while ((lcp = ldap_connections) != NULL) +for (LDAP_CONNECTION *lcp; lcp = ldap_connections; ldap_connections = lcp->next) { - DEBUG(D_lookup) debug_printf_indent("unbind LDAP connection to %s:%d\n", lcp->host, - lcp->port); - if(lcp->bound == TRUE) - ldap_unbind(lcp->ld); - ldap_connections = lcp->next; + DEBUG(D_lookup) debug_printf_indent("unbind LDAP connection to %s:%d\n", + lcp->host, lcp->port); + if(lcp->bound) ldap_unbind(lcp->ld); } }