From 3437406a0bbe592ae3f9b4fba37fdfafe744d97f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Thu, 23 Mar 2006 21:01:19 +0000 Subject: [PATCH] honor "chase-referrals no" (ITS#4447) --- servers/slapd/back-ldap/bind.c | 11 +++++------ servers/slapd/back-meta/conn.c | 7 +++---- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/servers/slapd/back-ldap/bind.c b/servers/slapd/back-ldap/bind.c index b8fc62aaaf..a2d94cec19 100644 --- a/servers/slapd/back-ldap/bind.c +++ b/servers/slapd/back-ldap/bind.c @@ -229,9 +229,9 @@ ravl_print( Avlnode *root, int depth ) } lc = root->avl_data; - fprintf( stderr, "lc=%p local=\"%s\" conn=%p %s\n", + fprintf( stderr, "lc=%p local=\"%s\" conn=%p %s refcnt=%d\n", (void *)lc, lc->lc_local_ndn.bv_val, (void *)lc->lc_conn, - avl_bf2str( root->avl_bf) ); + avl_bf2str( root->avl_bf ), lc->lc_refcnt ); ravl_print( root->avl_left, depth+1 ); } @@ -447,10 +447,9 @@ ldap_back_prepare_conn( ldapconn_t **lcp, Operation *op, SlapReply *rs, ldap_bac } ldap_set_option( ld, LDAP_OPT_PROTOCOL_VERSION, (const void *)&vers ); - /* automatically chase referrals ("[dont-]chase-referrals" statement) */ - if ( LDAP_BACK_CHASE_REFERRALS( li ) ) { - ldap_set_option( ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON ); - } + /* automatically chase referrals ("chase-referrals [{yes|no}" statement) */ + ldap_set_option( ld, LDAP_OPT_REFERRALS, + LDAP_BACK_CHASE_REFERRALS( li ) ? LDAP_OPT_ON : LDAP_OPT_OFF ); #ifdef HAVE_TLS rs->sr_err = ldap_back_start_tls( ld, op->o_protocol, &is_tls, diff --git a/servers/slapd/back-meta/conn.c b/servers/slapd/back-meta/conn.c index 7af76de199..a02518e32e 100644 --- a/servers/slapd/back-meta/conn.c +++ b/servers/slapd/back-meta/conn.c @@ -279,10 +279,9 @@ meta_back_init_one_conn( vers = op->o_conn->c_protocol; ldap_set_option( msc->msc_ld, LDAP_OPT_PROTOCOL_VERSION, &vers ); - /* automatically chase referrals ("chase-referrals"/"dont-chase-referrals" statement) */ - if ( LDAP_BACK_CHASE_REFERRALS( mi ) ) { - ldap_set_option( msc->msc_ld, LDAP_OPT_REFERRALS, LDAP_OPT_ON ); - } + /* automatically chase referrals ("chase-referrals [{yes|no}]" statement) */ + ldap_set_option( msc->msc_ld, LDAP_OPT_REFERRALS, + LDAP_BACK_CHASE_REFERRALS( mi ) ? LDAP_OPT_ON : LDAP_OPT_OFF ); #ifdef HAVE_TLS /* start TLS ("tls [try-]{start|propagate}" statement) */ -- 2.39.5