]> git.sur5r.net Git - openldap/commitdiff
For ITS#5421: Remove ldap-int.h dependencies.
authorHallvard Furuseth <hallvard@openldap.org>
Mon, 22 Nov 2010 12:51:44 +0000 (12:51 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Mon, 22 Nov 2010 12:51:44 +0000 (12:51 +0000)
LDAP_FREE() -> ber_memfree(), msg->lm_ber -> ldap_get_message_ber(msg).

servers/slapd/back-ldap/search.c
servers/slapd/back-meta/map.c
servers/slapd/back-meta/search.c
servers/slapd/overlays/rwmmap.c

index 95ecdbd343cf02c1ec29f087ef3a6b38932df57e..950e02108da974ed49c230c4fa8b4b2c1ecc073f 100644 (file)
@@ -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;
index 9e6439c5730a403681109fbd0b5815bb99602c97..e90d3dd187348e0844e5bf2c037183537d37e7e5 100644 (file)
@@ -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;
index a89cbb521afe01e03264fb6c1252a2f32a6daa94..05afd70cb6f9a105cae0b203acfe1a517a0b4168 100644 (file)
@@ -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;
index c92fb9c0baea6efc8ae2025d77d34c275ba69b20..61e507ff4f914ad7abb69f715a999cf318732e90 100644 (file)
@@ -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;