- 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 ( INDEX, 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 ( INDEX, ARGS, "<= bdb_list_candidates: rc=%d\n", rc, 0, 0 );
+#else
+ Debug( LDAP_DEBUG_FILTER,
+ "<= bdb_list_candidates: undefined rc=%d\n",
+ rc, 0, 0 );
+#endif
+ }
+
+ return rc;