]> git.sur5r.net Git - openldap/commitdiff
Fix previous commit, only zero out v3 refer_cnt if we got a SEARCH_RESULT.
authorHoward Chu <hyc@openldap.org>
Thu, 2 May 2002 12:08:19 +0000 (12:08 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 2 May 2002 12:08:19 +0000 (12:08 +0000)
If we got a SEARCH_REFERENCE, we need to keep going...

libraries/libldap/result.c

index 5905f43afa1417870e1c8397fd238b1fb052599e..f409afcc9ebedccb2e94b91edbe2e76f62bcfb5e 100644 (file)
@@ -647,8 +647,13 @@ try_read1msg(
                {
                        tmpber = *ber;  /* struct copy */
                        if ( v3ref == 1 ) {
-                               /* V3 search reference or V3 referral successfully chased */
-                               refer_cnt = 0;
+                               /* V3 search reference or V3 referral
+                                * sucessfully chased. If this message
+                                * is a search result, then it has no more
+                                * outstanding referrals.
+                                */
+                               if ( tag == LDAP_RES_SEARCH_RESULT )
+                                       refer_cnt = 0;
                        } else if ( ber_scanf( &tmpber, "{iaa}", &lderr,
                            &lr->lr_res_matched, &lr->lr_res_error )
                            != LBER_ERROR ) {