minor cleanup

This commit is contained in:
Pierangelo Masarati 2004-12-09 23:11:08 +00:00
parent 10f8eae366
commit d3210693d2

View File

@ -193,6 +193,7 @@ fe_op_add( Operation *op, SlapReply *rs )
Entry *e = op->ora_e; Entry *e = op->ora_e;
Modifications *modlist = op->ora_modlist; Modifications *modlist = op->ora_modlist;
Modifications **modtail = &modlist; Modifications **modtail = &modlist;
int rc = 0;
manageDSAit = get_manageDSAit( op ); manageDSAit = get_manageDSAit( op );
@ -306,7 +307,12 @@ fe_op_add( Operation *op, SlapReply *rs )
cb.sc_next = op->o_callback; cb.sc_next = op->o_callback;
op->o_callback = &cb; op->o_callback = &cb;
} }
if ( (op->o_bd->be_add)( op, rs ) == 0 ) { rc = (op->o_bd->be_add)( op, rs );
if ( rc == 0 ) {
/* FIXME: be_entry_release_w() should be
* called by do_add(), so that global
* overlays on the way back can
* at least read the entry */
be_entry_release_w( op, e ); be_entry_release_w( op, e );
e = NULL; e = NULL;
} }
@ -370,7 +376,7 @@ fe_op_add( Operation *op, SlapReply *rs )
#endif /* LDAP_SLAPI */ #endif /* LDAP_SLAPI */
done:; done:;
return rs->sr_err; return rc;
} }
int int