Skip to content
Snippets Groups Projects
Commit 17712c56 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Sync with HEAD

parent b06a3685
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ meta_back_add( Operation *op, SlapReply *rs )
int i, candidate = -1;
Attribute *a;
LDAPMod **attrs;
struct berval mdn = { 0, NULL }, mapped;
struct berval mdn = BER_BVNULL, mapped;
dncookie dc;
#ifdef NEW_LOGGING
......
......@@ -191,7 +191,7 @@ meta_back_do_single_bind(
)
{
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
ber_int_t msgid;
dncookie dc;
struct metasingleconn *lsc = &lc->conns[ candidate ];
......
......@@ -38,7 +38,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
struct metaconn *lc;
struct metasingleconn *lsc;
char *match = NULL, *err = NULL;
struct berval mmatch = { 0, NULL };
struct berval mmatch = BER_BVNULL;
int candidates = 0, last = 0, i, count = 0, rc;
int cres = LDAP_SUCCESS, rres = LDAP_SUCCESS;
int *msgid;
......@@ -70,7 +70,7 @@ meta_back_compare( Operation *op, SlapReply *rs )
dc.ctx = "compareDN";
for ( i = 0, lsc = lc->conns; !META_LAST(lsc); ++i, ++lsc ) {
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
struct berval mapped_attr = op->oq_compare.rs_ava->aa_desc->ad_cname;
struct berval mapped_value = op->oq_compare.rs_ava->aa_value;
......
......@@ -37,7 +37,7 @@ meta_back_delete( Operation *op, SlapReply *rs )
struct metainfo *li = ( struct metainfo * )op->o_bd->be_private;
struct metaconn *lc;
int candidate = -1;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
dncookie dc;
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
......
......@@ -56,9 +56,9 @@ meta_back_group(
char *gattr[ 2 ];
char *filter = NULL, *ptr;
LDAP *ld = NULL;
struct berval mop_ndn = { 0, NULL }, mgr_ndn = { 0, NULL };
struct berval mop_ndn = BER_BVNULL, mgr_ndn = BER_BVNULL;
struct berval group_oc_name = { 0, NULL };
struct berval group_oc_name = BER_BVNULL;
struct berval group_at_name = group_at->ad_cname;
if ( group_oc->soc_names && group_oc->soc_names[ 0 ] ) {
......
......@@ -41,7 +41,7 @@ meta_back_modify( Operation *op, SlapReply *rs )
LDAPMod *mods = NULL;
Modifications *ml;
int candidate = -1, i;
struct berval mdn = { 0, NULL };
struct berval mdn = BER_BVNULL;
struct berval mapped;
dncookie dc;
......@@ -114,19 +114,19 @@ meta_back_modify( Operation *op, SlapReply *rs )
*/
if ( strcmp( ml->sml_desc->ad_type->sat_syntax->ssyn_oid,
SLAPD_DN_SYNTAX ) == 0 ) {
( void )ldap_dnattr_rewrite( &dc, ml->sml_bvalues );
( void )ldap_dnattr_rewrite( &dc, ml->sml_values );
}
if ( ml->sml_bvalues != NULL ){
for (j = 0; ml->sml_bvalues[ j ].bv_val; j++);
mods[ i ].mod_bvalues = (struct berval **)ch_malloc((j+1) *
if ( ml->sml_values != NULL ){
for (j = 0; ml->sml_values[ j ].bv_val; j++);
mods[ i ].mod_values = (struct berval **)ch_malloc((j+1) *
sizeof(struct berval *));
for (j = 0; ml->sml_bvalues[ j ].bv_val; j++)
mods[ i ].mod_bvalues[ j ] = &ml->sml_bvalues[j];
mods[ i ].mod_bvalues[ j ] = NULL;
for (j = 0; ml->sml_values[ j ].bv_val; j++)
mods[ i ].mod_values[ j ] = &ml->sml_values[j];
mods[ i ].mod_values[ j ] = NULL;
} else {
mods[ i ].mod_bvalues = NULL;
mods[ i ].mod_values = NULL;
}
i++;
......@@ -141,7 +141,7 @@ cleanup:;
}
if ( modv != NULL ) {
for ( i = 0; modv[ i ]; i++) {
free( modv[ i ]->mod_bvalues );
free( modv[ i ]->mod_values );
}
}
free( mods );
......
......@@ -50,8 +50,8 @@ meta_back_modrdn( Operation *op, SlapReply *rs )
struct metaconn *lc;
int rc = 0;
int candidate = -1;
struct berval mdn = { 0, NULL },
mnewSuperior = { 0, NULL };
struct berval mdn = BER_BVNULL,
mnewSuperior = BER_BVNULL;
dncookie dc;
lc = meta_back_getconn( op, rs, META_OP_REQUIRE_SINGLE,
......
......@@ -61,7 +61,7 @@ meta_back_search( Operation *op, SlapReply *rs )
LDAPMessage *res = NULL, *e;
int rc = 0, *msgid, sres = LDAP_SUCCESS;
char *err = NULL;
struct berval match = { 0, NULL }, mmatch = { 0, NULL };
struct berval match = BER_BVNULL, mmatch = BER_BVNULL;
BerVarray v2refs = NULL;
int i, last = 0, candidates = 0, initial_candidates = 0,
......@@ -110,8 +110,8 @@ meta_back_search( Operation *op, SlapReply *rs )
struct berval realbase = op->o_req_dn;
int realscope = op->ors_scope;
ber_len_t suffixlen = 0;
struct berval mbase = { 0, NULL };
struct berval mfilter = { 0, NULL };
struct berval mbase = BER_BVNULL;
struct berval mfilter = BER_BVNULL;
char **mapped_attrs = NULL;
if ( lsc->candidate != META_CANDIDATE ) {
......@@ -558,7 +558,7 @@ meta_send_entry(
Entry ent = {0};
BerElement ber = *e->lm_ber;
Attribute *attr, **attrp;
struct berval dummy = { 0, NULL };
struct berval dummy = BER_BVNULL;
struct berval *bv, bdn;
const char *text;
dncookie dc;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment