- Debug( LDAP_DEBUG_FILTER,
- "<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
- (long) ids[0],
- (long) BDB_IDL_FIRST(ids),
- (long) BDB_IDL_LAST(ids) );
- return 0;
+ if( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "filterindex", LDAP_LEVEL_RESULTS, "<= bdb_list_candidates: id=%ld first=%ld last=%ld\n", (long) ids[0], (long) BDB_IDL_FIRST( ids ), (long) BDB_IDL_LAST( ids ) ));
+#else
+ Debug( LDAP_DEBUG_FILTER,
+ "<= bdb_list_candidates: id=%ld first=%ld last=%ld\n",
+ (long) ids[0],
+ (long) BDB_IDL_FIRST(ids),
+ (long) BDB_IDL_LAST(ids) );
+#endif
+
+ } else {
+#ifdef NEW_LOGGING
+ LDAP_LOG (( "filterindex", LDAP_LEVEL_ARGS, "<= bdb_list_candidates: rc=%d\n", rc));
+#else
+ Debug( LDAP_DEBUG_FILTER,
+ "<= bdb_list_candidates: undefined rc=%d\n",
+ rc, 0, 0 );
+#endif
+ }
+
+ return rc;