#endif /* !ENABLE_REWRITE */
avl_free( rwmap->rwm_oc.remap, NULL );
- avl_free( rwmap->rwm_oc.map, mapping_free );
+ avl_free( rwmap->rwm_oc.map, rwm_mapping_free );
avl_free( rwmap->rwm_at.remap, NULL );
- avl_free( rwmap->rwm_at.map, mapping_free );
+ avl_free( rwmap->rwm_at.map, rwm_mapping_free );
}
return rc;
int rwm_dn_massage(dncookie *dc, struct berval *dn, struct berval *res);
/* attributeType/objectClass mapping */
-int mapping_cmp (const void *, const void *);
-int mapping_dup (void *, void *);
+int rwm_mapping_cmp (const void *, const void *);
+int rwm_mapping_dup (void *, void *);
void rwm_map_init ( struct ldapmap *lm, struct ldapmapping ** );
void rwm_map ( struct ldapmap *map, struct berval *s, struct berval *m,
char ***mapped_attrs
);
-extern void mapping_free ( void *mapping );
+extern void rwm_mapping_free ( void *mapping );
extern int rwm_map_config(
struct ldapmap *oc_map,
}
}
- if ( (src[0] != '\0' && avl_find( map->map, (caddr_t)mapping, mapping_cmp ) != NULL)
- || avl_find( map->remap, (caddr_t)&mapping[1], mapping_cmp ) != NULL)
+ if ( (src[0] != '\0' && avl_find( map->map, (caddr_t)mapping, rwm_mapping_cmp ) != NULL)
+ || avl_find( map->remap, (caddr_t)&mapping[1], rwm_mapping_cmp ) != NULL)
{
fprintf( stderr,
"%s: line %d: duplicate mapping found (ignored)\n",
if ( src[0] != '\0' ) {
avl_insert( &map->map, (caddr_t)mapping,
- mapping_cmp, mapping_dup );
+ rwm_mapping_cmp, rwm_mapping_dup );
}
avl_insert( &map->remap, (caddr_t)&mapping[1],
- mapping_cmp, mapping_dup );
+ rwm_mapping_cmp, rwm_mapping_dup );
return 0;
#include "../../../libraries/libldap/ldap-int.h"
int
-mapping_cmp ( const void *c1, const void *c2 )
+rwm_mapping_cmp ( const void *c1, const void *c2 )
{
struct ldapmapping *map1 = (struct ldapmapping *)c1;
struct ldapmapping *map2 = (struct ldapmapping *)c2;
}
int
-mapping_dup ( void *c1, void *c2 )
+rwm_mapping_dup ( void *c1, void *c2 )
{
struct ldapmapping *map1 = (struct ldapmapping *)c1;
struct ldapmapping *map2 = (struct ldapmapping *)c2;
mapping[1].dst = mapping->dst;
avl_insert( &lm->map, (caddr_t)mapping,
- mapping_cmp, mapping_dup );
+ rwm_mapping_cmp, rwm_mapping_dup );
avl_insert( &lm->remap, (caddr_t)&mapping[1],
- mapping_cmp, mapping_dup );
+ rwm_mapping_cmp, rwm_mapping_dup );
*m = mapping;
}
bv->bv_len = 0;
bv->bv_val = NULL;
fmapping.src = *s;
- mapping = (struct ldapmapping *)avl_find( tree, (caddr_t)&fmapping, mapping_cmp );
+ mapping = (struct ldapmapping *)avl_find( tree, (caddr_t)&fmapping, rwm_mapping_cmp );
if (mapping != NULL) {
if ( mapping->dst.bv_val )
*bv = mapping->dst;
return LDAP_SUCCESS;
}
-int
+static int
map_attr_value(
dncookie *dc,
AttributeDescription *ad,
}
void
-mapping_free( void *v_mapping )
+rwm_mapping_free( void *v_mapping )
{
struct ldapmapping *mapping = v_mapping;
ch_free( mapping->src.bv_val );