version 1.84.2.10, 2005/01/31 15:53:39
|
version 1.84.2.11, 2005/04/17 23:55:21
|
Line 191 chkResponseList(
|
Line 191 chkResponseList(
|
break; |
break; |
} |
} |
|
|
if ( lm->lm_chain == NULL ) { |
for ( tmp = lm; tmp != NULL; tmp = tmp->lm_chain ) { |
if ((lm->lm_msgtype == LDAP_RES_SEARCH_ENTRY) || |
if ( tmp->lm_msgtype != LDAP_RES_SEARCH_ENTRY |
(lm->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) || |
&& tmp->lm_msgtype != LDAP_RES_SEARCH_REFERENCE |
(lm->lm_msgtype == LDAP_RES_INTERMEDIATE)) { |
&& tmp->lm_msgtype != LDAP_RES_INTERMEDIATE ) |
tmp = NULL; |
{ |
} else { |
break; |
tmp = lm; |
|
} |
|
} else { |
|
if ((lm->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_SEARCH_ENTRY) || |
|
(lm->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_SEARCH_REFERENCE) || |
|
(lm->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_INTERMEDIATE)) { |
|
tmp = NULL; |
|
} else { |
|
tmp = lm->lm_chain_tail->lm_chain; |
|
} |
} |
} |
} |
|
|
Line 429 try_read1msg(
|
Line 417 try_read1msg(
|
LDAPMessage **result ) |
LDAPMessage **result ) |
{ |
{ |
BerElement *ber; |
BerElement *ber; |
LDAPMessage *new, *l, *prev, *tmp, *chain_head; |
LDAPMessage *new, *l, *prev, *tmp; |
ber_int_t id; |
ber_int_t id; |
ber_tag_t tag; |
ber_tag_t tag; |
ber_len_t len; |
ber_len_t len; |
Line 903 lr->lr_res_matched ? lr->lr_res_matched
|
Line 891 lr->lr_res_matched ? lr->lr_res_matched
|
firstmsg = 0; |
firstmsg = 0; |
new->lm_next = ld->ld_responses; |
new->lm_next = ld->ld_responses; |
ld->ld_responses = new; |
ld->ld_responses = new; |
new->lm_chain_tail = new; |
|
chain_head = new; |
|
} else { |
} else { |
tmp->lm_chain = new; |
tmp->lm_chain = new; |
chain_head->lm_chain_tail = tmp; |
|
} |
} |
tmp = new; |
tmp = new; |
/* "ok" means there's more to parse */ |
/* "ok" means there's more to parse */ |
Line 929 lr->lr_res_matched ? lr->lr_res_matched
|
Line 914 lr->lr_res_matched ? lr->lr_res_matched
|
* first response off the head of the chain. |
* first response off the head of the chain. |
*/ |
*/ |
tmp->lm_chain = new; |
tmp->lm_chain = new; |
chain_head->lm_chain_tail = tmp; |
|
*result = chkResponseList( ld, msgid, all ); |
*result = chkResponseList( ld, msgid, all ); |
ld->ld_errno = LDAP_SUCCESS; |
ld->ld_errno = LDAP_SUCCESS; |
return( (*result)->lm_msgtype ); |
return( (*result)->lm_msgtype ); |
Line 973 lr->lr_res_matched ? lr->lr_res_matched
|
Line 957 lr->lr_res_matched ? lr->lr_res_matched
|
|
|
new->lm_next = ld->ld_responses; |
new->lm_next = ld->ld_responses; |
ld->ld_responses = new; |
ld->ld_responses = new; |
new->lm_chain_tail = new; |
|
goto exit; |
goto exit; |
} |
} |
|
|
Line 987 lr->lr_res_matched ? lr->lr_res_matched
|
Line 970 lr->lr_res_matched ? lr->lr_res_matched
|
#endif |
#endif |
|
|
/* part of a search response - add to end of list of entries */ |
/* part of a search response - add to end of list of entries */ |
if (l->lm_chain == NULL) { |
for ( tmp = l; (tmp->lm_chain != NULL) && |
if ((l->lm_msgtype == LDAP_RES_SEARCH_ENTRY) || |
((tmp->lm_chain->lm_msgtype == LDAP_RES_SEARCH_ENTRY) || |
(l->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) || |
(tmp->lm_chain->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) || |
(l->lm_msgtype == LDAP_RES_INTERMEDIATE)) { |
(tmp->lm_chain->lm_msgtype == LDAP_RES_INTERMEDIATE )); |
/* do not advance lm_chain_tail in this case */ |
tmp = tmp->lm_chain ) |
l->lm_chain = new; |
; /* NULL */ |
} else { |
tmp->lm_chain = new; |
/*FIXME: ldap_msgfree( l );*/ |
|
l = new; |
|
l->lm_chain_tail = new; |
|
} |
|
} else { |
|
if ((l->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_SEARCH_ENTRY) || |
|
(l->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_SEARCH_REFERENCE) || |
|
(l->lm_chain_tail->lm_chain->lm_msgtype |
|
== LDAP_RES_INTERMEDIATE)) { |
|
l->lm_chain_tail->lm_chain->lm_chain = new; |
|
l->lm_chain_tail = l->lm_chain_tail->lm_chain; |
|
} else { |
|
/*FIXME: ldap_msgfree( l->lm_chain_tail->lm_chain );*/ |
|
l->lm_chain_tail->lm_chain = new; |
|
} |
|
} |
|
|
|
/* return the whole chain if that's what we were looking for */ |
/* return the whole chain if that's what we were looking for */ |
if ( foundit ) { |
if ( foundit ) { |