int
slap_parse_sync_cookie(
- struct sync_cookie *cookie
+ struct sync_cookie *cookie,
+ void *memctx
)
{
char *csn_ptr;
break;
}
if ( valid ) {
- ber_str2bv( csn_str, csn_str_len, 1, &cookie->ctxcsn );
+ ber_str2bv_x( csn_str, csn_str_len, 1, &cookie->ctxcsn, memctx );
} else {
BER_BVZERO( &cookie->ctxcsn );
}
scp = (struct sync_cookie *) ch_calloc( 1,
sizeof( struct sync_cookie ));
ber_str2bv( optarg, 0, 1, &scp->octet_str );
- slap_parse_sync_cookie( scp );
+ slap_parse_sync_cookie( scp, NULL );
LDAP_STAILQ_FOREACH( scp_entry, &slap_sync_cookie, sc_next ) {
if ( scp->rid == scp_entry->rid ) {
sr->sr_rhint = rhint;
if (!BER_BVISNULL(&cookie)) {
ber_dupbv( &sr->sr_state.octet_str, &cookie );
- slap_parse_sync_cookie( &sr->sr_state );
+ slap_parse_sync_cookie( &sr->sr_state, op->o_tmpmemctx );
}
op->o_controls[slap_cids.sc_LDAPsync] = sr;
LDAP_SLAPD_F (void) slap_sync_cookie_free LDAP_P((
struct sync_cookie *, int free_cookie ));
LDAP_SLAPD_F (int) slap_parse_sync_cookie LDAP_P((
- struct sync_cookie * ));
+ struct sync_cookie *, void *memctx ));
LDAP_SLAPD_F (int) slap_init_sync_cookie_ctxcsn LDAP_P((
struct sync_cookie * ));
LDAP_SLAPD_F (struct sync_cookie *) slap_dup_sync_cookie LDAP_P((
}
if ( !BER_BVISNULL( &syncCookie.octet_str ) )
{
- slap_parse_sync_cookie( &syncCookie );
+ slap_parse_sync_cookie( &syncCookie, NULL );
}
}
if ( syncrepl_message_to_entry( si, op, msg,
}
if ( !BER_BVISNULL( &syncCookie.octet_str ) )
{
- slap_parse_sync_cookie( &syncCookie );
+ slap_parse_sync_cookie( &syncCookie, NULL );
}
}
if ( ber_peek_tag( ber, &len ) == LDAP_TAG_REFRESHDELETES )
}
if ( !BER_BVISNULL( &syncCookie.octet_str ) )
{
- slap_parse_sync_cookie( &syncCookie );
+ slap_parse_sync_cookie( &syncCookie, NULL );
}
}
if ( ber_peek_tag( ber, &len ) ==
}
if ( !BER_BVISNULL( &syncCookie.octet_str ) )
{
- slap_parse_sync_cookie( &syncCookie );
+ slap_parse_sync_cookie( &syncCookie, NULL );
}
}
if ( ber_peek_tag( ber, &len ) ==