Commit 63de8a6e authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

s/0/LDAP_MSG_ONE/ per Steve's patch (ITS#542)

parent dcee0a76
...@@ -114,7 +114,7 @@ ldap_result( ...@@ -114,7 +114,7 @@ ldap_result(
if ( msgid == LDAP_RES_ANY || lm->lm_msgid == msgid ) { if ( msgid == LDAP_RES_ANY || lm->lm_msgid == msgid ) {
LDAPMessage *tmp; LDAPMessage *tmp;
if ( all == 0 if ( all == LDAP_MSG_ONE
|| (lm->lm_msgtype != LDAP_RES_SEARCH_RESULT || (lm->lm_msgtype != LDAP_RES_SEARCH_RESULT
&& lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE /* LDAPv3 */ && lm->lm_msgtype != LDAP_RES_SEARCH_REFERENCE /* LDAPv3 */
&& lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY) ) && lm->lm_msgtype != LDAP_RES_SEARCH_ENTRY) )
...@@ -138,13 +138,13 @@ ldap_result( ...@@ -138,13 +138,13 @@ ldap_result(
} }
if ( lastlm == NULL ) { if ( lastlm == NULL ) {
ld->ld_responses = (all == 0 && lm->lm_chain != NULL ld->ld_responses = (all == LDAP_MSG_ONE && lm->lm_chain != NULL
? lm->lm_chain : lm->lm_next); ? lm->lm_chain : lm->lm_next);
} else { } else {
lastlm->lm_next = (all == 0 && lm->lm_chain != NULL lastlm->lm_next = (all == LDAP_MSG_ONE && lm->lm_chain != NULL
? lm->lm_chain : lm->lm_next); ? lm->lm_chain : lm->lm_next);
} }
if ( all == 0 && lm->lm_chain != NULL ) if ( all == LDAP_MSG_ONE && lm->lm_chain != NULL )
{ {
lm->lm_chain->lm_next = lm->lm_next; lm->lm_chain->lm_next = lm->lm_next;
lm->lm_chain = NULL; lm->lm_chain = NULL;
...@@ -477,7 +477,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" ); ...@@ -477,7 +477,7 @@ lr->lr_res_matched ? lr->lr_res_matched : "" );
/* is this the one we're looking for? */ /* is this the one we're looking for? */
if ( msgid == LDAP_RES_ANY || id == msgid ) { if ( msgid == LDAP_RES_ANY || id == msgid ) {
if ( all == 0 if ( all == LDAP_MSG_ONE
|| (new->lm_msgtype != LDAP_RES_SEARCH_RESULT || (new->lm_msgtype != LDAP_RES_SEARCH_RESULT
&& new->lm_msgtype != LDAP_RES_SEARCH_ENTRY) ) { && new->lm_msgtype != LDAP_RES_SEARCH_ENTRY) ) {
*result = new; *result = new;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment