mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 16:19:35 -05:00
parent
e70bc5dd64
commit
0645878d5d
3 changed files with 21 additions and 1 deletions
|
|
@ -370,6 +370,23 @@ slap_parse_sync_cookie(
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* count the numcsns and regenerate the list of SIDs in a recomposed cookie */
|
||||||
|
void
|
||||||
|
slap_reparse_sync_cookie(
|
||||||
|
struct sync_cookie *cookie,
|
||||||
|
void *memctx )
|
||||||
|
{
|
||||||
|
if ( cookie->ctxcsn ) {
|
||||||
|
for (; !BER_BVISNULL( &cookie->ctxcsn[cookie->numcsns] ); cookie->numcsns++);
|
||||||
|
}
|
||||||
|
if ( cookie->numcsns ) {
|
||||||
|
cookie->sids = slap_parse_csn_sids( cookie->ctxcsn, cookie->numcsns,
|
||||||
|
memctx );
|
||||||
|
if ( cookie->numcsns > 1 )
|
||||||
|
slap_sort_csn_sids( cookie->ctxcsn, cookie->sids, cookie->numcsns, memctx );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
slap_init_sync_cookie_ctxcsn(
|
slap_init_sync_cookie_ctxcsn(
|
||||||
struct sync_cookie *cookie
|
struct sync_cookie *cookie
|
||||||
|
|
|
||||||
|
|
@ -1185,6 +1185,8 @@ LDAP_SLAPD_F (void) slap_insert_csn_sids LDAP_P((
|
||||||
struct sync_cookie *ck, int, int, struct berval * ));
|
struct sync_cookie *ck, int, int, struct berval * ));
|
||||||
LDAP_SLAPD_F (int) slap_parse_sync_cookie LDAP_P((
|
LDAP_SLAPD_F (int) slap_parse_sync_cookie LDAP_P((
|
||||||
struct sync_cookie *, void *memctx ));
|
struct sync_cookie *, void *memctx ));
|
||||||
|
LDAP_SLAPD_F (int) slap_reparse_sync_cookie LDAP_P((
|
||||||
|
struct sync_cookie *, void *memctx ));
|
||||||
LDAP_SLAPD_F (int) slap_init_sync_cookie_ctxcsn LDAP_P((
|
LDAP_SLAPD_F (int) slap_init_sync_cookie_ctxcsn LDAP_P((
|
||||||
struct sync_cookie * ));
|
struct sync_cookie * ));
|
||||||
LDAP_SLAPD_F (struct sync_cookie *) slap_dup_sync_cookie LDAP_P((
|
LDAP_SLAPD_F (struct sync_cookie *) slap_dup_sync_cookie LDAP_P((
|
||||||
|
|
|
||||||
|
|
@ -590,7 +590,8 @@ check_syncprov(
|
||||||
slap_compose_sync_cookie( NULL, &si->si_syncCookie.octet_str,
|
slap_compose_sync_cookie( NULL, &si->si_syncCookie.octet_str,
|
||||||
si->si_syncCookie.ctxcsn, si->si_syncCookie.rid,
|
si->si_syncCookie.ctxcsn, si->si_syncCookie.rid,
|
||||||
si->si_syncCookie.sid );
|
si->si_syncCookie.sid );
|
||||||
slap_parse_sync_cookie( &si->si_syncCookie, NULL );
|
ch_free( si->si_syncCookie.sids );
|
||||||
|
slap_reparse_sync_cookie( &si->si_syncCookie, op->o_tmpmemctx );
|
||||||
}
|
}
|
||||||
ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex );
|
ldap_pvt_thread_mutex_unlock( &si->si_cookieState->cs_mutex );
|
||||||
return changed;
|
return changed;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue