mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-26 01:29:59 -05:00
helper to destroy modrdn modifications...
This commit is contained in:
parent
c226563da4
commit
662cb94e06
2 changed files with 31 additions and 2 deletions
|
|
@ -519,3 +519,30 @@ done:
|
|||
|
||||
return rs->sr_err;
|
||||
}
|
||||
|
||||
void
|
||||
slap_modrdn2mods_free( Modifications *mod )
|
||||
{
|
||||
Modifications *tmp;
|
||||
|
||||
for ( ; mod; mod = tmp ) {
|
||||
tmp = mod->sml_next;
|
||||
/* slap_modrdn2mods does things one way,
|
||||
* slap_mods_opattrs does it differently
|
||||
*/
|
||||
if ( mod->sml_op != SLAP_MOD_SOFTADD &&
|
||||
mod->sml_op != LDAP_MOD_DELETE )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
if ( mod->sml_nvalues ) {
|
||||
free( mod->sml_nvalues[0].bv_val );
|
||||
}
|
||||
|
||||
free( mod );
|
||||
}
|
||||
|
||||
slap_mods_free( mod, 1 );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1016,13 +1016,15 @@ LDAP_SLAPD_F (int) filter_matched_values(
|
|||
/*
|
||||
* modrdn.c
|
||||
*/
|
||||
LDAP_SLAPD_F (int) slap_modrdn2mods(
|
||||
LDAP_SLAPD_F (int) slap_modrdn2mods LDAP_P((
|
||||
Operation *op,
|
||||
SlapReply *rs,
|
||||
Entry *e,
|
||||
LDAPRDN oldrdn,
|
||||
LDAPRDN newrdn,
|
||||
Modifications **pmod );
|
||||
Modifications **pmod ));
|
||||
|
||||
LDAP_SLAPD_F (void) slap_modrdn2mods_free LDAP_P(( Modifications *mod ));
|
||||
|
||||
/*
|
||||
* modify.c
|
||||
|
|
|
|||
Loading…
Reference in a new issue