mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
resolve naming conflicts when compiling rwm overlay as static (will disappear as soon as rwm stuff is removed from back-ldap/back-meta)
This commit is contained in:
parent
9920e9fbf6
commit
588f1f6185
@ -573,9 +573,9 @@ rwm_destroy(
|
||||
#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;
|
||||
|
@ -79,8 +79,8 @@ typedef struct dncookie {
|
||||
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,
|
||||
@ -103,7 +103,7 @@ rwm_map_attrs(
|
||||
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,
|
||||
|
@ -161,8 +161,8 @@ rwm_map_config(
|
||||
}
|
||||
}
|
||||
|
||||
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",
|
||||
@ -173,10 +173,10 @@ rwm_map_config(
|
||||
|
||||
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;
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
||||
#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;
|
||||
@ -47,7 +47,7 @@ mapping_cmp ( const void *c1, const void *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;
|
||||
@ -76,9 +76,9 @@ rwm_map_init ( struct ldapmap *lm, struct ldapmapping **m )
|
||||
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;
|
||||
}
|
||||
|
||||
@ -97,7 +97,7 @@ rwm_map ( struct ldapmap *map, struct berval *s, struct berval *bv,
|
||||
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;
|
||||
@ -150,7 +150,7 @@ rwm_map_attrs(
|
||||
return LDAP_SUCCESS;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
map_attr_value(
|
||||
dncookie *dc,
|
||||
AttributeDescription *ad,
|
||||
@ -554,7 +554,7 @@ rwm_dnattr_result_rewrite(
|
||||
}
|
||||
|
||||
void
|
||||
mapping_free( void *v_mapping )
|
||||
rwm_mapping_free( void *v_mapping )
|
||||
{
|
||||
struct ldapmapping *mapping = v_mapping;
|
||||
ch_free( mapping->src.bv_val );
|
||||
|
Loading…
Reference in New Issue
Block a user