mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
more cleanup
This commit is contained in:
parent
6fdb803bde
commit
5a920206dd
@ -498,7 +498,8 @@ ldap_back_entry_get(
|
|||||||
{
|
{
|
||||||
struct ldapconn *lc;
|
struct ldapconn *lc;
|
||||||
int rc = 1,
|
int rc = 1,
|
||||||
is_oc;
|
is_oc,
|
||||||
|
do_not_cache;
|
||||||
struct berval bdn;
|
struct berval bdn;
|
||||||
LDAPMessage *result = NULL,
|
LDAPMessage *result = NULL,
|
||||||
*e = NULL;
|
*e = NULL;
|
||||||
@ -509,17 +510,17 @@ ldap_back_entry_get(
|
|||||||
int do_retry = 1;
|
int do_retry = 1;
|
||||||
|
|
||||||
/* Tell getconn this is a privileged op */
|
/* Tell getconn this is a privileged op */
|
||||||
is_oc = op->o_do_not_cache;
|
do_not_cache = op->o_do_not_cache;
|
||||||
op->o_do_not_cache = 1;
|
op->o_do_not_cache = 1;
|
||||||
lc = ldap_back_getconn( op, &rs );
|
lc = ldap_back_getconn( op, &rs );
|
||||||
oconn = op->o_conn;
|
oconn = op->o_conn;
|
||||||
op->o_conn = NULL;
|
op->o_conn = NULL;
|
||||||
if ( !lc || !ldap_back_dobind( lc, op, &rs ) ) {
|
if ( !lc || !ldap_back_dobind( lc, op, &rs ) ) {
|
||||||
op->o_do_not_cache = is_oc;
|
op->o_do_not_cache = do_not_cache;
|
||||||
op->o_conn = oconn;
|
op->o_conn = oconn;
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
op->o_do_not_cache = is_oc;
|
op->o_do_not_cache = do_not_cache;
|
||||||
op->o_conn = oconn;
|
op->o_conn = oconn;
|
||||||
|
|
||||||
if ( at ) {
|
if ( at ) {
|
||||||
|
@ -114,6 +114,13 @@ ldap_chain_response( Operation *op, SlapReply *rs )
|
|||||||
op->o_callback = NULL;
|
op->o_callback = NULL;
|
||||||
|
|
||||||
if ( lip->url == NULL ) {
|
if ( lip->url == NULL ) {
|
||||||
|
/* if we parse the URI then by no means
|
||||||
|
* we can cache stuff or reuse connections,
|
||||||
|
* because in back-ldap there's no caching
|
||||||
|
* based on the URI value, which is supposed
|
||||||
|
* to be set once for all (correct?) */
|
||||||
|
op->o_do_not_cache = 1;
|
||||||
|
|
||||||
/* FIXME: we're setting the URI of the first referral;
|
/* FIXME: we're setting the URI of the first referral;
|
||||||
* what if there are more? Is this something we should
|
* what if there are more? Is this something we should
|
||||||
* worry about? */
|
* worry about? */
|
||||||
|
Loading…
Reference in New Issue
Block a user