ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
assert( BEI(e) );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch( op, rs, ps_list, e,
- LDAP_PSEARCH_BY_ADD );
+ rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_ADD );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_add: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_add: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_no_psearch ) {
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
+ rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_DELETE );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_delete: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_delete: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch(op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
+ rc = bdb_psearch(op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
/* Loop through in-scope entries for each psearch spec */
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
+ rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
- bdb_psearch(op, rs, pm_list->ps_op,
+ rc = bdb_psearch(op, rs, pm_list->ps_op,
e, LDAP_PSEARCH_BY_SCOPEOUT);
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modify: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
LDAP_LIST_REMOVE ( pm_list, ps_link );
pm_prev = pm_list;
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );
if ( rs->sr_err == LDAP_SUCCESS && !op->o_noop && !op->o_no_psearch ) {
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
+ rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_PREMODIFY );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
ldap_pvt_thread_rdwr_wunlock( &bdb->bi_pslist_rwlock );
}
/* Loop through in-scope entries for each psearch spec */
ldap_pvt_thread_rdwr_wlock( &bdb->bi_pslist_rwlock );
LDAP_LIST_FOREACH ( ps_list, &bdb->bi_psearch_list, o_ps_link ) {
- bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
+ rc = bdb_psearch( op, rs, ps_list, e, LDAP_PSEARCH_BY_MODIFY );
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
}
pm_list = LDAP_LIST_FIRST(&op->o_pm_list);
while ( pm_list != NULL ) {
- bdb_psearch(op, rs, pm_list->ps_op,
+ rc = bdb_psearch(op, rs, pm_list->ps_op,
e, LDAP_PSEARCH_BY_SCOPEOUT);
+ if ( rc ) {
+#ifdef NEW_LOGGING
+ LDAP_LOG ( OPERATION, ERR,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#else
+ Debug( LDAP_DEBUG_TRACE,
+ "bdb_modrdn: persistent search failed (%d,%d)\n",
+ rc, rs->sr_err, 0 );
+#endif
+ }
pm_prev = pm_list;
LDAP_LIST_REMOVE ( pm_list, ps_link );
pm_list = LDAP_LIST_NEXT ( pm_list, ps_link );