Revert previous commit, didn't solve anything. Probably made things worse.

This commit is contained in:
Howard Chu 2004-04-08 12:40:49 +00:00
parent c86e07dd25
commit efdeee929d

View File

@ -725,7 +725,6 @@ ldap_chase_v3referrals( LDAP *ld, LDAPRequest *lr, char **refs, int sref, char *
char **refarray = NULL; char **refarray = NULL;
LDAPConn *lc; LDAPConn *lc;
int rc, count, i, j, id; int rc, count, i, j, id;
int parent_was_reference;
LDAPreqinfo rinfo; LDAPreqinfo rinfo;
ld->ld_errno = LDAP_SUCCESS; /* optimistic */ ld->ld_errno = LDAP_SUCCESS; /* optimistic */
@ -761,11 +760,6 @@ ldap_chase_v3referrals( LDAP *ld, LDAPRequest *lr, char **refs, int sref, char *
goto done; goto done;
} }
/* check if parent request was a search reference */
parent_was_reference = ( lr->lr_parent &&
lr->lr_parent->lr_res_msgtype == LDAP_RES_SEARCH_REFERENCE ) ?
1 : 0;
/* find original request */ /* find original request */
for ( origreq = lr; for ( origreq = lr;
origreq->lr_parent != NULL; origreq->lr_parent != NULL;
@ -896,8 +890,7 @@ ldap_chase_v3referrals( LDAP *ld, LDAPRequest *lr, char **refs, int sref, char *
ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex ); ldap_pvt_thread_mutex_lock( &ld->ld_req_mutex );
#endif #endif
rc = ldap_send_server_request( ld, ber, id, rc = ldap_send_server_request( ld, ber, id,
(sref && !parent_was_reference) ? origreq : lr, origreq, srv, NULL, &rinfo );
srv, NULL, &rinfo );
#ifdef LDAP_R_COMPILE #ifdef LDAP_R_COMPILE
ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex ); ldap_pvt_thread_mutex_unlock( &ld->ld_req_mutex );
#endif #endif