From b39e9d151dfb638a6a65a487dcf28ae61111024d Mon Sep 17 00:00:00 2001 From: Hallvard Furuseth Date: Mon, 22 Nov 2010 12:51:44 +0000 Subject: [PATCH] For ITS#5421: Remove ldap-int.h dependencies. LDAP_FREE() -> ber_memfree(), msg->lm_ber -> ldap_get_message_ber(msg). --- servers/slapd/back-ldap/search.c | 8 ++++---- servers/slapd/back-meta/map.c | 2 +- servers/slapd/back-meta/search.c | 2 +- servers/slapd/overlays/rwmmap.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index 95ecdbd343..950e02108d 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -575,7 +575,7 @@ retry: if ( dnPretty( NULL, &match, &pmatch, op->o_tmpmemctx ) == LDAP_SUCCESS ) { rs->sr_matched = pmatch.bv_val; - LDAP_FREE( match.bv_val ); + ber_memfree( match.bv_val ); } else { rs->sr_matched = match.bv_val; @@ -615,14 +615,14 @@ finish:; ber_memfree_x( (char *)rs->sr_matched, op->o_tmpmemctx ); } else { - LDAP_FREE( match.bv_val ); + ber_memfree( match.bv_val ); } rs->sr_matched = save_matched; } if ( rs->sr_text ) { if ( freetext ) { - LDAP_FREE( (char *)rs->sr_text ); + ber_memfree( (char *)rs->sr_text ); } rs->sr_text = NULL; } @@ -655,7 +655,7 @@ ldap_build_entry( struct berval *bdn ) { struct berval a; - BerElement ber = *e->lm_ber; + BerElement ber = *ldap_get_message_ber( e ); Attribute *attr, **attrp; const char *text; int last; diff --git a/servers/slapd/back-meta/map.c b/servers/slapd/back-meta/map.c index 9e6439c573..e90d3dd187 100644 --- a/servers/slapd/back-meta/map.c +++ b/servers/slapd/back-meta/map.c @@ -769,7 +769,7 @@ ldap_back_referral_result_rewrite( ber_memfree_x( a_vals[ i ].bv_val, memctx ); ber_str2bv_x( newurl, 0, 1, &a_vals[ i ], memctx ); - LDAP_FREE( newurl ); + ber_memfree( newurl ); ludp->lud_dn = olddn.bv_val; } break; diff --git a/servers/slapd/back-meta/search.c b/servers/slapd/back-meta/search.c index a89cbb521a..05afd70cb6 100644 --- a/servers/slapd/back-meta/search.c +++ b/servers/slapd/back-meta/search.c @@ -1848,7 +1848,7 @@ meta_send_entry( int check_duplicate_attrs = 0; int check_sorted_attrs = 0; Entry ent = { 0 }; - BerElement ber = *e->lm_ber; + BerElement ber = *ldap_get_message_ber( e ); Attribute *attr, **attrp; struct berval bdn, dn = BER_BVNULL; diff --git a/servers/slapd/overlays/rwmmap.c b/servers/slapd/overlays/rwmmap.c index c92fb9c0ba..61e507ff4f 100644 --- a/servers/slapd/overlays/rwmmap.c +++ b/servers/slapd/overlays/rwmmap.c @@ -987,7 +987,7 @@ rwm_referral_rewrite( } ber_str2bv( newurl, 0, 1, &a_vals[i] ); - LDAP_FREE( newurl ); + ber_memfree( newurl ); if ( pa_nvals ) { ludp->lud_dn = ndn.bv_val; @@ -1007,7 +1007,7 @@ rwm_referral_rewrite( ch_free( (*pa_nvals)[i].bv_val ); } ber_str2bv( newurl, 0, 1, &(*pa_nvals)[i] ); - LDAP_FREE( newurl ); + ber_memfree( newurl ); } ch_free( oldval.bv_val ); @@ -1218,7 +1218,7 @@ rwm_referral_result_rewrite( ch_free( a_vals[i].bv_val ); ber_str2bv( newurl, 0, 1, &a_vals[i] ); - LDAP_FREE( newurl ); + ber_memfree( newurl ); ludp->lud_dn = olddn.bv_val; } break; -- 2.39.5