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 */
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);
} 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 );
}
}
*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 );
*/
void slap_mods_opattrs(
Operation *op,
- Modifications *mods,
+ Modifications **modsp,
int manage_ctxcsn )
{
struct berval name, timestamp, csn = BER_BVNULL;
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;
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;
}
}
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;
}