for( ; attrs->an_name.bv_val; attrs++ ) {
AttributeType *a;
ObjectClass *oc;
- int rc;
if ( attrs->an_desc ) {
int lr;
}
if( oc != NULL ) {
if ( attrs->an_oc_exclude ) {
- int gotit = 0;
-
if ( oc == slap_schema.si_oc_extensibleObject ) {
/* extensibleObject allows the return of anything */
return 0;
static int
bdb_db_destroy( BackendDB *be )
{
- int rc;
struct bdb_info *bdb = (struct bdb_info *) be->be_private;
if( bdb->bi_dbenv_home ) ch_free( bdb->bi_dbenv_home );
int isroot = -1;
int rc_id = 0;
ID id = NOID;
- const char *text = NULL;
char textbuf[SLAP_TEXT_BUFLEN];
size_t textlen = sizeof textbuf;
/* Added to support newSuperior */
SlapReply *rs )
{
struct ldbminfo *li = (struct ldbminfo *) op->o_bd->be_private;
- int rc, err;
- const char *text = NULL;
+ int rc;
time_t stoptime;
ID_BLOCK *candidates;
ID id, cursor;
int backend_shutdown( Backend *be )
{
- int i;
int rc = 0;
BackendInfo *bi;
int backend_destroy(void)
{
- int i;
BackendDB *bd;
BackendInfo *bi;
be_db_close( void )
{
BackendDB *be;
- int i;
LDAP_STAILQ_FOREACH( be, &backendDB, be_next ) {
if ( be->bd_info->bi_db_close ) {
int manageDSAit,
int noSubs )
{
- int i, j;
+ int j;
ber_len_t len, dnlen = dn->bv_len;
Backend *be, *b2 = NULL;
int rc;
int opid;
BerElement *ber;
- int i;
assert( ber_bvcmp( &slap_EXOP_CANCEL, &op->ore_reqoid ) == 0 );
int config_set_vals(ConfigTable *Conf, ConfigArgs *c) {
int rc, arg_type;
- void *ptr;
+ void *ptr = NULL;
arg_type = Conf->arg_type;
if(arg_type & ARG_MAGIC) {
char *token;
char *hide[] = { "rootpw", "replica", "bindpw", "pseudorootpw", "dbpasswd", '\0' };
char *quote_ptr;
- int i;
+ int i = -1;
c->tline = ch_strdup(c->line);
token = strtok_quote(c->tline, " \t", "e_ptr);
slap_controls_init( void )
{
int i, rc;
- struct slap_control *sc;
rc = LDAP_SUCCESS;
get_supported_controls(char ***ctrloidsp,
slap_mask_t **ctrlmasks)
{
- int i, n;
+ int n;
char **oids;
slap_mask_t *masks;
- int rc;
struct slap_control *sc;
n = 0;
{
BerElement *ber;
struct berval fstr = BER_BVNULL;
- const char *err_msg = "";
if ( op->o_assert != SLAP_CONTROL_NONE ) {
rs->sr_text = "assert control specified multiple times";
{
BerElement *ber;
struct berval fstr = BER_BVNULL;
- const char *err_msg = "";
if ( op->o_valuesreturnfilter != SLAP_CONTROL_NONE ) {
rs->sr_text = "valuesReturnFilter control specified multiple times";
ContentRule *cr;
int i, num;
struct berval bv, *bva = NULL, idx;
- char ibuf[32], *ptr;
+ char ibuf[32];
if ( !start )
start = LDAP_STAILQ_FIRST( &cr_list );
)
{
struct slap_csn_entry *csne, *committed_csne = NULL;
- int i = 0;
if ( maxcsn ) {
BER_BVZERO( maxcsn );
struct berval *context_csn )
{
Entry* e;
- int rc;
struct berval bv;
{
int rc;
Entry *e;
- struct berval *nvalsp;
struct berval *type, *vals, *nvals;
char *freeval;
AttributeDescription *ad, *ad_prev;
LDAPMod **modv = NULL;
#endif
int increment = op->orm_increment;
- int rc = 0;
BackendDB *op_be;
char textbuf[ SLAP_TEXT_BUFLEN ];
size_t textlen = sizeof( textbuf );
void
slap_op_free( Operation *op )
{
- struct berval slap_empty_bv_dup;
-
assert( LDAP_STAILQ_NEXT(op, o_next) == NULL );
if ( op->o_ber != NULL ) {
)
{
Operation *op;
- struct berval slap_empty_bv_dup;
ldap_pvt_thread_mutex_lock( &slap_op_mutex );
if ((op = LDAP_STAILQ_FIRST( &slap_free_ops ))) {
void
replog( Operation *op )
{
- Modifications *ml = NULL;
- Attribute *a = NULL;
FILE *fp, *lfp;
int i;
/* undef NO_LOG_WHEN_NO_REPLICAS */
case LDAP_REQ_MODIFY:
for ( ml = op->orm_modlist; ml != NULL; ml = ml->sml_next ) {
- char *did, *type = ml->sml_desc->ad_cname.bv_val;
+ char *did = NULL, *type = ml->sml_desc->ad_cname.bv_val;
switch ( ml->sml_op ) {
case LDAP_MOD_ADD:
did = "add"; break;
BerVarray *keysp,
void *ctx )
{
- ber_len_t i, j, len, nkeys;
+ ber_len_t i, nkeys;
size_t slen, mlen;
BerVarray keys;
{
SubstringsAssertion *sa;
char pre;
- ber_len_t len, max, nkeys = 0;
+ ber_len_t nkeys = 0;
size_t slen, mlen, klen;
BerVarray keys;
HASH_CONTEXT HASHcontext;
struct berval *in )
{
int rc;
- int state;
ber_len_t n;
struct berval sn, i;
if( in->bv_len < 3 ) return LDAP_INVALID_SYNTAX;
void *ctx )
{
int rc;
- int state;
ber_len_t n;
struct berval sn, i, newi;
void *ctx )
{
int rc;
- int state;
ber_len_t n;
struct berval sn, i, newi;
void *ctx )
{
int i, j;
- size_t slen, mlen;
BerVarray keys;
char tmp[5];
BerValue bvtmp; /* 40 bit index */
ber_len_t size_shift;
int pad = 2*sizeof(int)-1, pad_shift;
int order = -1, order_start = -1, order_end = -1;
- int i, k;
+ int i;
struct slab_object *so;
#ifdef NO_THREADS
struct slab_object *so_new, *so_left, *so_right;
ber_len_t *ptr, *new;
unsigned long diff;
- int i, j, k;
+ int i, j;
/* ber_set_option calls us like this */
if (!ctx) return ber_memalloc_x(size, NULL);
slap_sl_realloc(void *ptr, ber_len_t size, void *ctx)
{
struct slab_heap *sh = ctx;
- int size_shift;
- int pad = 2*sizeof(int)-1, pad_shift;
- int order_start = -1, order = -1;
- struct slab_object *so;
+ int pad = 2*sizeof(int) -1;
ber_len_t *p = (ber_len_t *)ptr, *new;
- unsigned long diff;
if (ptr == NULL)
return slap_sl_malloc(size, ctx);
int order_start = -1, order = -1;
struct slab_object *so;
unsigned long diff;
- int i, k, inserted = 0;
+ int i, inserted = 0;
if (!sh || ptr < sh->sh_base || ptr >= sh->sh_end) {
ber_memfree_x(ptr, NULL);
int
starttls_extop ( Operation *op, SlapReply *rs )
{
- void *ctx;
int rc;
if ( op->ore_reqdata != NULL ) {