typedef struct syncinfo_s {
struct slap_backend_db *si_be;
struct re_s *si_re;
- long si_rid;
+ int si_rid;
slap_bindconf si_bindconf;
struct berval si_base;
struct berval si_logbase;
} else if ( RETRYNUM_VALID( si->si_retrynum[i] ) ) {
if ( si->si_retrynum[i] > 0 )
si->si_retrynum[i]--;
- fail = si->si_retrynum;
+ fail = si->si_retrynum[i];
rtask->interval.tv_sec = si->si_retryinterval[i];
ldap_pvt_runqueue_resched( &slapd_rq, rtask, 0 );
slap_wake_listener();
for (i=0; uuids[i].bv_val; i++) {
op->ors_slimit = 1;
- slap_uuidstr_from_normalized( &uf.f_av_value, &uuids[i],
- op->o_tmpmemctx );
- filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
- op->o_tmpfree( uf.f_av_value.bv_val, op->o_tmpmemctx );
uf.f_av_value = uuids[i];
+ filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
rc = be->be_search( op, &rs_search );
op->o_tmpfree( op->ors_filterstr.bv_val, op->o_tmpmemctx );
}
Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
return -1;
}
+ if ( select_backend( &si->si_base, 0, 0 ) != c->be ) {
+ ber_memfree( si->si_base.bv_val );
+ snprintf( c->msg, sizeof( c->msg ),
+ "Base DN \"%s\" is not within the database naming context",
+ val );
+ Debug( LDAP_DEBUG_ANY, "%s: %s.\n", c->log, c->msg, 0 );
+ return -1;
+ }
gots |= GOT_BASE;
} else if ( !strncasecmp( c->argv[ i ], LOGBASESTR "=",
STRLENOF( LOGBASESTR "=" ) ) )
si->si_bindconf.sb_uri = uri;
ptr = buf;
- ptr += snprintf( ptr, sizeof( buf ), IDSTR "=%03ld " PROVIDERSTR "=%s",
+ ptr += snprintf( ptr, sizeof( buf ), IDSTR "=%03d " PROVIDERSTR "=%s",
si->si_rid, si->si_bindconf.sb_uri.bv_val );
if ( !BER_BVISNULL( &bc )) {
ptr = lutil_strcopy( ptr, bc.bv_val );