Lines Matching refs:lr

48 static int chase_one_referral( LDAP *ld, LDAPRequest *lr, LDAPRequest *origreq,
158 LDAPRequest *lr;
235 if (( lr = (LDAPRequest *)NSLDAPI_CALLOC( 1, sizeof( LDAPRequest ))) ==
238 if ( lr != NULL ) {
239 NSLDAPI_FREE( lr );
251 lr->lr_binddn = bindreqdn;
252 lr->lr_msgid = msgid;
253 lr->lr_status = LDAP_REQST_INPROGRESS;
254 lr->lr_res_errno = LDAP_SUCCESS; /* optimistic */
255 lr->lr_ber = ber;
256 lr->lr_conn = lc;
263 lr->lr_origid = parentreq->lr_origid;
264 lr->lr_parentcnt = parentreq->lr_parentcnt + 1;
265 lr->lr_parent = parentreq;
267 lr->lr_sibling = parentreq->lr_child;
269 parentreq->lr_child = lr;
271 lr->lr_origid = lr->lr_msgid;
275 if (( lr->lr_next = ld->ld_requests ) != NULL ) {
276 lr->lr_next->lr_prev = lr;
278 ld->ld_requests = lr;
279 lr->lr_prev = NULL;
285 lr->lr_status = LDAP_REQST_WRITING;
290 nsldapi_free_request( ld, lr, 0 );
682 LDAPRequest *lr;
688 if (( lr = ld->ld_requests ) == NULL ) {
691 for ( ; lr != NULL; lr = lr->lr_next ) {
693 lr->lr_msgid, lr->lr_origid, ( lr->lr_status ==
695 ( lr->lr_status == LDAP_REQST_CHASINGREFS ) ? "ChasingRefs" :
696 ( lr->lr_status == LDAP_REQST_NOTCONNECTED ) ? "NotConnected" :
697 ( lr->lr_status == LDAP_REQST_CONNDEAD ) ? "Dead" :
701 lr->lr_outrefcnt, lr->lr_parentcnt );
703 if ( lr->lr_binddn != NULL ) {
704 sprintf( msg, " pending bind DN: <%s>\n", lr->lr_binddn );
735 nsldapi_free_request( LDAP *ld, LDAPRequest *lr, int free_conn )
741 lr, lr->lr_origid, lr->lr_msgid );
743 if ( lr->lr_parent != NULL ) {
744 --lr->lr_parent->lr_outrefcnt;
748 for ( tmplr = lr->lr_child; tmplr != NULL; tmplr = nextlr ) {
754 nsldapi_free_connection( ld, lr->lr_conn, NULL, NULL, 0, 1 );
757 if ( lr->lr_prev == NULL ) {
758 ld->ld_requests = lr->lr_next;
760 lr->lr_prev->lr_next = lr->lr_next;
763 if ( lr->lr_next != NULL ) {
764 lr->lr_next->lr_prev = lr->lr_prev;
767 if ( lr->lr_ber != NULL ) {
768 ber_free( lr->lr_ber, 1 );
771 if ( lr->lr_res_error != NULL ) {
772 NSLDAPI_FREE( lr->lr_res_error );
775 if ( lr->lr_res_matched != NULL ) {
776 NSLDAPI_FREE( lr->lr_res_matched );
779 if ( lr->lr_binddn != NULL ) {
780 NSLDAPI_FREE( lr->lr_binddn );
782 NSLDAPI_FREE( lr );
816 nsldapi_chase_v2_referrals( LDAP *ld, LDAPRequest *lr, char **errstrp,
845 if ( lr->lr_parentcnt >= ld->ld_refhoplimit ) {
853 for ( origreq = lr; origreq->lr_parent != NULL;
871 rc = chase_one_referral( ld, lr, origreq, ref, "v2 referral",
893 nsldapi_chase_v3_refs( LDAP *ld, LDAPRequest *lr, char **v3refs,
907 if ( lr->lr_parentcnt >= ld->ld_refhoplimit ) {
915 for ( origreq = lr; origreq->lr_parent != NULL;
927 rc = chase_one_referral( ld, lr, origreq, v3refs[i],
948 chase_one_referral( LDAP *ld, LDAPRequest *lr, LDAPRequest *origreq,
1056 lr, srv, NULL, NULL, 1 ) < 0 ) {
1225 LDAPRequest *lr;
1227 for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) {
1228 if ( msgid == lr->lr_msgid ) {
1233 return( lr );
1246 LDAPRequest *lr;
1254 for ( lr = ld->ld_requests; lr != NULL; lr = lr->lr_next ) {
1256 ( lr->lr_conn != NULL && lr->lr_conn->lconn_sb == sb )) {
1257 lr->lr_status = LDAP_REQST_CONNDEAD;
1258 if ( lr->lr_conn != NULL ) {
1259 lr->lr_conn->lconn_status = LDAP_CONNST_DEAD;
1261 lr->lr_conn->lconn_sb );