mirror of
https://git.openldap.org/openldap/openldap.git
synced 2024-12-21 03:10:25 +08:00
control/TXN cleanup
This commit is contained in:
parent
544d00f3e5
commit
815c178edc
@ -47,6 +47,7 @@ bdb_add(Operation *op, SlapReply *rs )
|
||||
Debug(LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_add) ": %s\n",
|
||||
op->oq_add.rs_e->e_name.bv_val, 0, 0);
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
if( op->o_txnSpec ) {
|
||||
/* acquire connection lock */
|
||||
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
|
||||
@ -76,6 +77,7 @@ txnReturn:
|
||||
send_ldap_result( op, rs );
|
||||
return rs->sr_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctrls[num_ctrls] = 0;
|
||||
|
||||
|
@ -55,6 +55,7 @@ bdb_delete( Operation *op, SlapReply *rs )
|
||||
Debug( LDAP_DEBUG_ARGS, "==> " LDAP_XSTRING(bdb_delete) ": %s\n",
|
||||
op->o_req_dn.bv_val, 0, 0 );
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
if( op->o_txnSpec ) {
|
||||
/* acquire connection lock */
|
||||
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
|
||||
@ -84,6 +85,7 @@ txnReturn:
|
||||
send_ldap_result( op, rs );
|
||||
return rs->sr_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctrls[num_ctrls] = 0;
|
||||
|
||||
|
@ -296,6 +296,7 @@ bdb_modify( Operation *op, SlapReply *rs )
|
||||
Debug( LDAP_DEBUG_ARGS, LDAP_XSTRING(bdb_modify) ": %s\n",
|
||||
op->o_req_dn.bv_val, 0, 0 );
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
if( op->o_txnSpec ) {
|
||||
/* acquire connection lock */
|
||||
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
|
||||
@ -325,6 +326,7 @@ txnReturn:
|
||||
send_ldap_result( op, rs );
|
||||
return rs->sr_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctrls[num_ctrls] = NULL;
|
||||
|
||||
|
@ -65,6 +65,7 @@ bdb_modrdn( Operation *op, SlapReply *rs )
|
||||
op->o_req_dn.bv_val,op->oq_modrdn.rs_newrdn.bv_val,
|
||||
op->oq_modrdn.rs_newSup ? op->oq_modrdn.rs_newSup->bv_val : "NULL" );
|
||||
|
||||
#ifdef LDAP_X_TXN
|
||||
if( op->o_txnSpec ) {
|
||||
/* acquire connection lock */
|
||||
ldap_pvt_thread_mutex_lock( &op->o_conn->c_mutex );
|
||||
@ -94,6 +95,7 @@ txnReturn:
|
||||
send_ldap_result( op, rs );
|
||||
return rs->sr_err;
|
||||
}
|
||||
#endif
|
||||
|
||||
ctrls[num_ctrls] = NULL;
|
||||
|
||||
|
@ -818,10 +818,14 @@ backend_check_controls(
|
||||
/* unrecognized control */
|
||||
if ( (*ctrls)->ldctl_iscritical ) {
|
||||
/* should not be reachable */
|
||||
Debug( LDAP_DEBUG_ANY,
|
||||
"backend_check_controls: unrecognized control: %s\n",
|
||||
Debug( LDAP_DEBUG_ANY, "backend_check_controls: "
|
||||
"unrecognized critical control: %s\n",
|
||||
(*ctrls)->ldctl_oid, 0, 0 );
|
||||
assert( 0 );
|
||||
} else {
|
||||
Debug( LDAP_DEBUG_TRACE, "backend_check_controls: "
|
||||
"unrecognized non-critical control: %s\n",
|
||||
(*ctrls)->ldctl_oid, 0, 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -492,9 +492,11 @@ slap_global_control( Operation *op, const char *oid, int *cid )
|
||||
return LDAP_COMPARE_TRUE;
|
||||
}
|
||||
|
||||
#if 0
|
||||
Debug( LDAP_DEBUG_TRACE,
|
||||
"slap_global_control: unavailable control: %s\n",
|
||||
oid, 0, 0 );
|
||||
#endif
|
||||
|
||||
return LDAP_COMPARE_FALSE;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user