datamorph_enum_mapping *mapping, needle = { .wire_value = *value };
struct berval db_value = { .bv_len = 1 };
- mapping = avl_find( definition->ti_enum.to_db, &needle,
+ mapping = ldap_avl_find( definition->ti_enum.to_db, &needle,
transformation_mapping_cmp );
if ( !mapping ) {
Debug( LDAP_DEBUG_ANY, "transform_to_db_format_one: "
case LDAP_FILTER_LE: {
transformation_info *t, needle = { .attr = f->f_ava->aa_desc };
- t = avl_find(
+ t = ldap_avl_find(
ov->transformations, &needle, transformation_info_cmp );
if ( t ) {
struct berval new_val;
continue;
}
- if ( avl_find( ov->transformations, &needle,
+ if ( ldap_avl_find( ov->transformations, &needle,
transformation_info_cmp ) ) {
rc = LDAP_CONSTRAINT_VIOLATION;
Debug( LDAP_DEBUG_TRACE, "datamorph_op_add: "
next = a->a_next;
- t = avl_find( ov->transformations, &needle, transformation_info_cmp );
+ t = ldap_avl_find( ov->transformations, &needle, transformation_info_cmp );
if ( !t ) continue;
rc = transform_to_db_format(
transformation_info *t, needle = { .attr = op->orc_ava->aa_desc };
int rc = SLAP_CB_CONTINUE;
- t = avl_find( ov->transformations, &needle, transformation_info_cmp );
+ t = ldap_avl_find( ov->transformations, &needle, transformation_info_cmp );
if ( t ) {
struct berval new_val;
if ( mod->sml_numvals == 0 ) continue; /* Nothing to transform */
- t = avl_find( ov->transformations, &needle, transformation_info_cmp );
+ t = ldap_avl_find( ov->transformations, &needle, transformation_info_cmp );
if ( !t ) continue;
assert( !mod->sml_nvalues );
continue;
}
- if ( avl_find(
+ if ( ldap_avl_find(
ov->transformations, &needle, transformation_info_cmp ) ) {
rc = LDAP_CONSTRAINT_VIOLATION;
Debug( LDAP_DEBUG_TRACE, "datamorph_op_modrdn: "
next = a->a_next;
- t = avl_find( ov->transformations, &needle, transformation_info_cmp );
+ t = ldap_avl_find( ov->transformations, &needle, transformation_info_cmp );
if ( !t ) continue;
rc = transform_from_db_format(
transformation_info *t, needle = { .attr = a->a_desc };
BerVarray new_vals;
- t = avl_find(
+ t = ldap_avl_find(
ov->transformations, &needle, transformation_info_cmp );
if ( !t ) continue;
transformation_info *info = arg;
if ( info->type == DATAMORPH_ENUM ) {
- avl_free( info->ti_enum.to_db, datamorph_mapping_free );
+ ldap_avl_free( info->ti_enum.to_db, datamorph_mapping_free );
}
ch_free( info );
}
ca->value_string = info->attr->ad_cname.bv_val;
return LDAP_SUCCESS;
} else if ( ca->op == LDAP_MOD_DELETE ) {
- info = avl_delete( &ov->transformations, info,
+ info = ldap_avl_delete( &ov->transformations, info,
transformation_info_cmp );
assert( info );
}
needle.attr = info->attr;
- if ( avl_find( ov->transformations, &needle, transformation_info_cmp ) ) {
+ if ( ldap_avl_find( ov->transformations, &needle, transformation_info_cmp ) ) {
rc = LDAP_CONSTRAINT_VIOLATION;
goto done;
}
if ( ov->wip_transformation ) {
/* We checked everything as were processing the lines */
- int rc = avl_insert( &ov->transformations, ov->wip_transformation,
- transformation_info_cmp, avl_dup_error );
+ int rc = ldap_avl_insert( &ov->transformations, ov->wip_transformation,
+ transformation_info_cmp, ldap_avl_dup_error );
assert( rc == LDAP_SUCCESS );
}
done:
if ( rc == LDAP_SUCCESS ) {
- rc = avl_insert( &info->ti_enum.to_db, mapping,
- transformation_mapping_cmp, avl_dup_error );
+ rc = ldap_avl_insert( &info->ti_enum.to_db, mapping,
+ transformation_mapping_cmp, ldap_avl_dup_error );
}
if ( rc ) {
ca->reply.err = rc;
return LDAP_SUCCESS;
}
- if ( avl_insert( &ov->transformations, info, transformation_info_cmp,
- avl_dup_error ) ) {
+ if ( ldap_avl_insert( &ov->transformations, info, transformation_info_cmp,
+ ldap_avl_dup_error ) ) {
goto fail;
}
return LDAP_SUCCESS;
return LDAP_SUCCESS;
}
- if ( avl_insert( &info->ti_enum.to_db, mapping, transformation_mapping_cmp,
- avl_dup_error ) ) {
+ if ( ldap_avl_insert( &info->ti_enum.to_db, mapping, transformation_mapping_cmp,
+ ldap_avl_dup_error ) ) {
goto fail;
}
info->ti_enum.from_db[mapping->db_value] = mapping->wire_value;
new_args.p = e;
new_args.index = 0;
- return avl_apply( info->ti_enum.to_db, datamorph_config_build_enum,
+ return ldap_avl_apply( info->ti_enum.to_db, datamorph_config_build_enum,
&new_args, 1, AVL_PREORDER );
}
if ( ov->wip_transformation ) {
/* There is one last item that is unfinished */
- int rc = avl_insert( &ov->transformations, ov->wip_transformation,
- transformation_info_cmp, avl_dup_error );
+ int rc = ldap_avl_insert( &ov->transformations, ov->wip_transformation,
+ transformation_info_cmp, ldap_avl_dup_error );
assert( rc == LDAP_SUCCESS );
}
- return avl_apply( ov->transformations, &datamorph_config_build_attr, &args,
+ return ldap_avl_apply( ov->transformations, &datamorph_config_build_attr, &args,
1, AVL_PREORDER );
}
datamorph_info *ov = on->on_bi.bi_private;
if ( ov ) {
- avl_free( ov->transformations, datamorph_info_free );
+ ldap_avl_free( ov->transformations, datamorph_info_free );
}
ch_free( ov );
needle.o_req_ndn = vai->dn;
}
- nop = avl_find( ops, &needle, variant_cmp_op );
+ nop = ldap_avl_find( ops, &needle, variant_cmp_op );
if ( nop == NULL ) {
nop = ch_calloc( 1, sizeof(Operation) );
*nop = *op;
nop->o_req_dn = nop->o_req_ndn;
nop->orm_modlist = NULL;
- rc = avl_insert( &ops, nop, variant_cmp_op, avl_dup_error );
+ rc = ldap_avl_insert( &ops, nop, variant_cmp_op, ldap_avl_dup_error );
assert( rc == 0 );
}
mod->sml_desc = vai->alternative;
rc = on->on_info->oi_orig->bi_op_modify( op, rs );
if ( rc == LDAP_SUCCESS ) {
/* FIXME: if a mod fails, should we attempt to apply the rest? */
- avl_apply( ops, variant_run_mod, &rc, -1, AVL_INORDER );
+ ldap_avl_apply( ops, variant_run_mod, &rc, -1, AVL_INORDER );
}
- avl_apply( ops, variant_reassign_mods, op, -1, AVL_INORDER );
- avl_free( ops, variant_free_op );
+ ldap_avl_apply( ops, variant_reassign_mods, op, -1, AVL_INORDER );
+ ldap_avl_free( ops, variant_free_op );
done:
Debug( LDAP_DEBUG_TRACE, "variant_op_mod: "