/* $OpenLDAP$ */
/* This work is part of OpenLDAP Software <http://www.openldap.org/>.
*
- * Copyright 2003 The OpenLDAP Foundation.
+ * Copyright 2003-2004 The OpenLDAP Foundation.
* Portions Copyright 2003 IBM Corporation.
* All rights reserved.
*
)
{
struct bdb_info *bdb = (struct bdb_info *) op->o_bd->be_private;
- struct berval ctxcsn_ndn = { 0, NULL };
+ struct berval ctxcsn_ndn = BER_BVNULL;
EntryInfo *ctxcsn_ei = NULL;
DB_LOCK ctxcsn_lock;
struct berval max_committed_csn;
modvals[1].bv_len = 0;
mod.sml_op = LDAP_MOD_REPLACE;
- mod.sml_bvalues = modvals;
+ mod.sml_values = modvals;
mod.sml_nvalues = NULL;
mod.sml_desc = slap_schema.si_ad_contextCSN;
mod.sml_type = mod.sml_desc->ad_cname;
goto rewind;
case DB_KEYEXIST :
rs->sr_err = LDAP_OTHER;
- rs->sr_text = "context csn exists before contex prefix does";
+ rs->sr_text = "context csn exists before context prefix does";
return BDB_CSN_ABORT;
default :
rs->sr_err = LDAP_OTHER;
struct berval bv;
LDAP_STAILQ_FOREACH( si, &op->o_bd->be_syncinfo, si_next ) {
- sprintf( substr, "cn=syncrepl%d", si->si_rid );
+ sprintf( substr, "cn=syncrepl%ld", si->si_rid );
ber_str2bv( substr, 0, 0, &bv );
build_new_dn( &ctxcsn_ndn, &op->o_bd->be_nsuffix[0], &bv, NULL );
ber_bvarray_add( &syncCookie.octet_str, &cookie );
slap_parse_sync_cookie( &syncCookie );
if ( *search_context_csn &&
- (*search_context_csn)->bv_val != NULL ) {
+ (*search_context_csn)->bv_val != NULL )
+ {
value_match( &match, slap_schema.si_ad_entryCSN,
slap_schema.si_ad_entryCSN->ad_type->sat_ordering,
SLAP_MR_VALUE_OF_ATTRIBUTE_SYNTAX,
- &syncCookie.ctxcsn, *search_context_csn, &text );
+ syncCookie.ctxcsn, *search_context_csn, &text );
}
if ( match < 0 ) {
/* set search_context_csn to the
ch_free( *search_context_csn );
}
*search_context_csn = ber_dupbv( NULL,
- syncCookie.ctxcsn );
+ syncCookie.ctxcsn );
}
slap_sync_cookie_free( &syncCookie, 0 );
} else {
return LDAP_BUSY;
case DB_LOCK_DEADLOCK:
case DB_LOCK_NOTGRANTED:
- goto consumer_ctxcsn_retry;
+ goto provider_ctxcsn_retry;
case DB_NOTFOUND:
snprintf( gid, sizeof( gid ), "%s-%08lx-%08lx",
bdb_uuid.bv_val, (long) op->o_connid, (long) op->o_opid );