]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/result.c
Added ldap_pvt_sasl_bind() prototype to ldap_pvt.h. This
[openldap] / libraries / libldap / result.c
index a47e0577e97b557058ea13bbcf557a01f6b94564..042e92a52e0a75d0cd5a863db182bb21a97838fb 100644 (file)
@@ -144,8 +144,11 @@ ldap_result(
                lastlm->lm_next = (all == 0 && lm->lm_chain != NULL
                    ? lm->lm_chain : lm->lm_next);
        }
-       if ( all == 0 )
+       if ( all == 0 && lm->lm_chain != NULL )
+       {
+               lm->lm_chain->lm_next = lm->lm_next;
                lm->lm_chain = NULL;
+       }
        lm->lm_next = NULL;
 
        *result = lm;
@@ -643,7 +646,7 @@ int
 ldap_msgtype( LDAPMessage *lm )
 {
        assert( lm != NULL );
-       return ( lm == NULL ) ? lm->lm_msgtype : -1;
+       return ( lm != NULL ) ? lm->lm_msgtype : -1;
 }
 
 
@@ -652,7 +655,7 @@ ldap_msgid( LDAPMessage *lm )
 {
        assert( lm != NULL );
 
-       return ( lm == NULL ) ? lm->lm_msgid : -1;
+       return ( lm != NULL ) ? lm->lm_msgid : -1;
 }