]> git.sur5r.net Git - openldap/blobdiff - libraries/libldap/result.c
silence excessive logging
[openldap] / libraries / libldap / result.c
index c99e2a84ff93a43036a1e537d1d7b30116392ca9..a1ee317cf6d31e78de76eb77fbcf554ba7674300 100644 (file)
@@ -103,15 +103,6 @@ ldap_result(
        Debug( LDAP_DEBUG_TRACE, "ldap_result msgid %d\n", msgid, 0, 0 );
 #endif
 
-       if( ld == NULL ) {
-               return -1;
-       }
-
-       if( result == NULL ) {
-               ld->ld_errno = LDAP_PARAM_ERROR;
-               return -1;
-       }
-
     lm = chkResponseList(ld, msgid, all);
 
        if ( lm == NULL ) {
@@ -647,7 +638,13 @@ try_read1msg(
                {
                        tmpber = *ber;  /* struct copy */
                        if ( v3ref == 1 ) {
-                               ; /* V3 search reference or V3 referral sucessfully chased */
+                               /* 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 ) {