Commit 2adcccb2 authored by Jong Hyuk Choi's avatar Jong Hyuk Choi
Browse files

logging psearch return code

parent 6830aca2
......@@ -504,8 +504,18 @@ retry: /* transaction retry */
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 );
}
......
......@@ -581,7 +581,18 @@ retry: /* transaction retry */
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 );
}
......
......@@ -542,7 +542,18 @@ retry: /* transaction retry */
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 );
}
......@@ -691,12 +702,34 @@ retry: /* transaction retry */
/* 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 );
......
......@@ -896,7 +896,18 @@ retry: /* transaction retry */
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 );
}
......@@ -1041,12 +1052,34 @@ retry: /* transaction retry */
/* 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 );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment