version 1.1.3.1.2.2, 1998/08/09 01:08:09
|
version 1.1.4.1, 1998/08/08 23:05:22
|
Line 231 wait4msg( LDAP *ld, int msgid, int all,
|
Line 231 wait4msg( LDAP *ld, int msgid, int all,
|
#else /* !LDAP_REFERRALS */ |
#else /* !LDAP_REFERRALS */ |
#ifdef LDAP_DEBUG |
#ifdef LDAP_DEBUG |
if ( ldap_debug & LDAP_DEBUG_TRACE ) { |
if ( ldap_debug & LDAP_DEBUG_TRACE ) { |
ldap_dump_connection( ld, ld->ld_conns, 1 ); |
dump_connection( ld, ld->ld_conns, 1 ); |
ldap_dump_requests_and_responses( ld ); |
dump_requests_and_responses( ld ); |
} |
} |
#endif /* LDAP_DEBUG */ |
#endif /* LDAP_DEBUG */ |
for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) { |
for ( lc = ld->ld_conns; lc != NULL; lc = lc->lconn_next ) { |
Line 276 wait4msg( LDAP *ld, int msgid, int all,
|
Line 276 wait4msg( LDAP *ld, int msgid, int all,
|
nextlc = lc->lconn_next; |
nextlc = lc->lconn_next; |
if ( lc->lconn_status == |
if ( lc->lconn_status == |
LDAP_CONNST_CONNECTED && |
LDAP_CONNST_CONNECTED && |
ldap_is_read_ready( ld, |
is_read_ready( ld, |
lc->lconn_sb )) { |
lc->lconn_sb )) { |
rc = read1msg( ld, msgid, all, |
rc = read1msg( ld, msgid, all, |
lc->lconn_sb, lc, result ); |
lc->lconn_sb, lc, result ); |
Line 326 read1msg( LDAP *ld, int msgid, int all,
|
Line 326 read1msg( LDAP *ld, int msgid, int all,
|
Debug( LDAP_DEBUG_TRACE, "read1msg\n", 0, 0, 0 ); |
Debug( LDAP_DEBUG_TRACE, "read1msg\n", 0, 0, 0 ); |
|
|
ber_init( &ber, 0 ); |
ber_init( &ber, 0 ); |
ldap_set_ber_options( ld, &ber ); |
set_ber_options( ld, &ber ); |
|
|
/* get the next message */ |
/* get the next message */ |
if ( (tag = ber_get_next( sb, &len, &ber )) |
if ( (tag = ber_get_next( sb, &len, &ber )) |
Line 349 read1msg( LDAP *ld, int msgid, int all,
|
Line 349 read1msg( LDAP *ld, int msgid, int all,
|
} |
} |
|
|
#ifdef LDAP_REFERRALS |
#ifdef LDAP_REFERRALS |
if (( lr = ldap_find_request_by_msgid( ld, id )) == NULL ) { |
if (( lr = find_request_by_msgid( ld, id )) == NULL ) { |
Debug( LDAP_DEBUG_ANY, |
Debug( LDAP_DEBUG_ANY, |
"no request for response with msgid %ld (tossing)\n", |
"no request for response with msgid %ld (tossing)\n", |
id, 0, 0 ); |
id, 0, 0 ); |
Line 384 read1msg( LDAP *ld, int msgid, int all,
|
Line 384 read1msg( LDAP *ld, int msgid, int all,
|
!= LBER_ERROR ) { |
!= LBER_ERROR ) { |
if ( lderr != LDAP_SUCCESS ) { |
if ( lderr != LDAP_SUCCESS ) { |
/* referrals are in error string */ |
/* referrals are in error string */ |
refer_cnt = ldap_chase_referrals( ld, lr, |
refer_cnt = chase_referrals( ld, lr, |
&lr->lr_res_error, &hadref ); |
&lr->lr_res_error, &hadref ); |
} |
} |
|
|
Line 455 lr->lr_res_matched ? lr->lr_res_matched
|
Line 455 lr->lr_res_matched ? lr->lr_res_matched
|
} |
} |
} |
} |
|
|
ldap_free_request( ld, lr ); |
free_request( ld, lr ); |
} |
} |
|
|
if ( lc != NULL ) { |
if ( lc != NULL ) { |
ldap_free_connection( ld, lc, 0, 1 ); |
free_connection( ld, lc, 0, 1 ); |
} |
} |
} |
} |
} |
} |
Line 481 lr->lr_res_matched ? lr->lr_res_matched
|
Line 481 lr->lr_res_matched ? lr->lr_res_matched
|
|
|
#ifndef NO_CACHE |
#ifndef NO_CACHE |
if ( ld->ld_cache != NULL ) { |
if ( ld->ld_cache != NULL ) { |
ldap_add_result_to_cache( ld, new ); |
add_result_to_cache( ld, new ); |
} |
} |
#endif /* NO_CACHE */ |
#endif /* NO_CACHE */ |
|
|
Line 542 lr->lr_res_matched ? lr->lr_res_matched
|
Line 542 lr->lr_res_matched ? lr->lr_res_matched
|
prev->lm_next = l->lm_next; |
prev->lm_next = l->lm_next; |
*result = l; |
*result = l; |
ld->ld_errno = LDAP_SUCCESS; |
ld->ld_errno = LDAP_SUCCESS; |
#ifndef ultrix |
|
return( l->lm_msgtype ); |
|
#else |
|
return( tag ); |
return( tag ); |
#endif |
|
} |
} |
|
|
return( -2 ); /* continue looking */ |
return( -2 ); /* continue looking */ |
Line 561 build_result_ber( LDAP *ld, BerElement *
|
Line 557 build_result_ber( LDAP *ld, BerElement *
|
long along; |
long along; |
|
|
ber_init( ber, 0 ); |
ber_init( ber, 0 ); |
ldap_set_ber_options( ld, ber ); |
set_ber_options( ld, ber ); |
if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid, |
if ( ber_printf( ber, "{it{ess}}", lr->lr_msgid, |
(long)lr->lr_res_msgtype, lr->lr_res_errno, |
(long)lr->lr_res_msgtype, lr->lr_res_errno, |
lr->lr_res_matched ? lr->lr_res_matched : "", |
lr->lr_res_matched ? lr->lr_res_matched : "", |
Line 591 merge_error_info( LDAP *ld, LDAPRequest
|
Line 587 merge_error_info( LDAP *ld, LDAPRequest
|
if ( lr->lr_res_errno == LDAP_PARTIAL_RESULTS ) { |
if ( lr->lr_res_errno == LDAP_PARTIAL_RESULTS ) { |
parentr->lr_res_errno = lr->lr_res_errno; |
parentr->lr_res_errno = lr->lr_res_errno; |
if ( lr->lr_res_error != NULL ) { |
if ( lr->lr_res_error != NULL ) { |
(void)ldap_append_referral( ld, &parentr->lr_res_error, |
(void)append_referral( ld, &parentr->lr_res_error, |
lr->lr_res_error ); |
lr->lr_res_error ); |
} |
} |
} else if ( lr->lr_res_errno != LDAP_SUCCESS && |
} else if ( lr->lr_res_errno != LDAP_SUCCESS && |