mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 09:39:45 -05:00
handle abnormal condition
This commit is contained in:
parent
86941d0c70
commit
70211e9be5
1 changed files with 13 additions and 4 deletions
|
|
@ -281,10 +281,19 @@ ldap_parse_result(
|
|||
#endif
|
||||
/* Find the result, last msg in chain... */
|
||||
lm = r->lm_chain_tail;
|
||||
if ((lm->lm_msgtype == LDAP_RES_SEARCH_ENTRY) ||
|
||||
(lm->lm_msgtype == LDAP_RES_SEARCH_REFERENCE) ||
|
||||
(lm->lm_msgtype == LDAP_RES_INTERMEDIATE)) {
|
||||
lm = NULL;
|
||||
/* FIXME: either this is not possible (assert?)
|
||||
* or it should be handled */
|
||||
if ( lm != NULL ) {
|
||||
switch ( lm->lm_msgtype ) {
|
||||
case LDAP_RES_SEARCH_ENTRY:
|
||||
case LDAP_RES_SEARCH_REFERENCE:
|
||||
case LDAP_RES_INTERMEDIATE:
|
||||
lm = NULL;
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if( lm == NULL ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue