ITS#10060 Return tag of last message if all=LDAP_MSG_ALL

This commit is contained in:
Ondřej Kuzník 2023-06-21 10:34:32 +01:00 committed by Quanah Gibson-Mount
parent 208d68cdd9
commit 3676f3ad69

View file

@ -295,7 +295,11 @@ wait4msg(
#endif /* LDAP_DEBUG */
if ( ( *result = chkResponseList( ld, msgid, all ) ) != NULL ) {
rc = (*result)->lm_msgtype;
if ( all == LDAP_MSG_ALL && (*result)->lm_chain ) {
rc = (*result)->lm_chain_tail->lm_msgtype;
} else {
rc = (*result)->lm_msgtype;
}
} else {
int lc_ready = 0;
@ -1082,7 +1086,7 @@ nextresp2:
chain_head->lm_chain_tail = newmsg;
*result = chkResponseList( ld, msgid, all );
ld->ld_errno = LDAP_SUCCESS;
return( (*result)->lm_msgtype );
return( (*result)->lm_chain_tail->lm_msgtype );
}
}
#endif /* LDAP_CONNECTIONLESS */