]> git.sur5r.net Git - openldap/commitdiff
ldap_result was losing messages when multiple msgids were queued,
authorHoward Chu <hyc@openldap.org>
Tue, 30 Nov 1999 13:32:06 +0000 (13:32 +0000)
committerHoward Chu <hyc@openldap.org>
Tue, 30 Nov 1999 13:32:06 +0000 (13:32 +0000)
and results were being returned one-at-a-time. Ugh, this cost me two
days, loss of hair, sleep, etc.....!

libraries/libldap/result.c

index 4ed68c7b8ee2b6f6faa44aa12e741d7b780b4bba..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;