mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-25 17:19:43 -05:00
better fix to ITS#4183 (the prototype in proto-slap.h was erroneously committed earlier)
This commit is contained in:
parent
429a6f5353
commit
55c52c5c72
5 changed files with 8 additions and 17 deletions
|
|
@ -290,7 +290,7 @@ bdb_modify( Operation *op, SlapReply *rs )
|
|||
ctrls[num_ctrls] = NULL;
|
||||
|
||||
if ( !SLAP_SHADOW( op->o_bd ))
|
||||
slap_mods_opattrs( op, op->orm_modlist, 1 );
|
||||
slap_mods_opattrs( op, &op->orm_modlist, 1 );
|
||||
|
||||
if( 0 ) {
|
||||
retry: /* transaction retry */
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ ldbm_back_modify(
|
|||
Debug(LDAP_DEBUG_ARGS, "ldbm_back_modify:\n", 0, 0, 0);
|
||||
|
||||
if ( !SLAP_SHADOW( op->o_bd ))
|
||||
slap_mods_opattrs( op, op->orm_modlist, 1 );
|
||||
slap_mods_opattrs( op, &op->orm_modlist, 1 );
|
||||
|
||||
/* grab giant lock for writing */
|
||||
ldap_pvt_thread_rdwr_wlock(&li->li_giant_rwlock);
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ monitor_back_modify( Operation *op, SlapReply *rs )
|
|||
|
||||
} else {
|
||||
assert( !SLAP_SHADOW( op->o_bd ) );
|
||||
slap_mods_opattrs( op, op->orm_modlist, 0 );
|
||||
slap_mods_opattrs( op, &op->orm_modlist, 0 );
|
||||
|
||||
rc = monitor_entry_modify( op, rs, e );
|
||||
}
|
||||
|
|
|
|||
|
|
@ -122,7 +122,7 @@ backsql_modify( Operation *op, SlapReply *rs )
|
|||
goto done;
|
||||
}
|
||||
|
||||
slap_mods_opattrs( op, op->orm_modlist, 1 );
|
||||
slap_mods_opattrs( op, &op->orm_modlist, 1 );
|
||||
|
||||
oc = backsql_id2oc( bi, bsi.bsi_base_id.eid_oc_id );
|
||||
assert( oc != NULL );
|
||||
|
|
|
|||
|
|
@ -169,14 +169,6 @@ do_modify(
|
|||
}
|
||||
*modtail = NULL;
|
||||
|
||||
if ( modlist == NULL ) {
|
||||
Debug( LDAP_DEBUG_ANY, "do_modify: no modifications\n", 0, 0, 0 );
|
||||
send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR,
|
||||
"change sequence empty" );
|
||||
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
if( get_ctrls( op, rs, 1 ) != LDAP_SUCCESS ) {
|
||||
Debug( LDAP_DEBUG_ANY, "do_modify: get_ctrls failed\n", 0, 0, 0 );
|
||||
|
||||
|
|
@ -819,7 +811,7 @@ void slap_timestamp( time_t *tm, struct berval *bv )
|
|||
*/
|
||||
void slap_mods_opattrs(
|
||||
Operation *op,
|
||||
Modifications *mods,
|
||||
Modifications **modsp,
|
||||
int manage_ctxcsn )
|
||||
{
|
||||
struct berval name, timestamp, csn = BER_BVNULL;
|
||||
|
|
@ -861,9 +853,8 @@ void slap_mods_opattrs(
|
|||
nname = op->o_ndn;
|
||||
}
|
||||
|
||||
for ( mod = mods; mod->sml_next; mod = mod->sml_next )
|
||||
for ( modtail = modsp; *modtail; modtail = &(*modtail)->sml_next )
|
||||
;
|
||||
modtail = &mod->sml_next;
|
||||
|
||||
mod = (Modifications *) ch_malloc( sizeof( Modifications ) );
|
||||
mod->sml_op = LDAP_MOD_REPLACE;
|
||||
|
|
@ -881,7 +872,7 @@ void slap_mods_opattrs(
|
|||
modtail = &mod->sml_next;
|
||||
|
||||
if ( get_manageDIT( op ) ) {
|
||||
for ( mod = mods; mod != modlast; mod = mod->sml_next ) {
|
||||
for ( mod = *modsp; mod != modlast; mod = mod->sml_next ) {
|
||||
if ( mod->sml_desc == slap_schema.si_ad_modifiersName ) {
|
||||
break;
|
||||
}
|
||||
|
|
@ -909,7 +900,7 @@ void slap_mods_opattrs(
|
|||
}
|
||||
|
||||
if ( get_manageDIT( op ) ) {
|
||||
for ( mod = mods; mod != modlast; mod = mod->sml_next ) {
|
||||
for ( mod = *modsp; mod != modlast; mod = mod->sml_next ) {
|
||||
if ( mod->sml_desc == slap_schema.si_ad_modifyTimestamp ) {
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue