]> git.sur5r.net Git - openldap/blobdiff - clients/tools/ldapsearch.c
referral is a legitimate result
[openldap] / clients / tools / ldapsearch.c
index fb85a60726e354b8178be329a363c4ccb68ebc94..fe83db5a0ae12efca5bdb7c020172766a40f39dc 100644 (file)
@@ -1547,7 +1547,12 @@ done:
                ldap_get_option( ld, LDAP_OPT_RESULT_CODE, (void *)&rc );
        }
 
-       if ( rc != 0 ) {
+       switch ( rc ) {
+       case LDAP_SUCCESS:
+       case LDAP_REFERRAL:
+               break;
+
+       default:
                tool_perror( "ldap_result", rc, NULL, NULL, NULL, NULL );
                return( rc );
        }