Commit 3e8b6ae6 authored by Quanah Gibson-Mount's avatar Quanah Gibson-Mount
Browse files

ITS#5969

parent 29fe732a
...@@ -13,6 +13,7 @@ OpenLDAP 2.4.15 Release (2009/02/19) ...@@ -13,6 +13,7 @@ OpenLDAP 2.4.15 Release (2009/02/19)
Fixed slapd-ldap/meta with entries with invalid attrs (ITS#5959) Fixed slapd-ldap/meta with entries with invalid attrs (ITS#5959)
Fixed slapd-relay control initialization (ITS#5724) Fixed slapd-relay control initialization (ITS#5724)
Fixed slapo-pcache caching invalid entries (ITS#5927) Fixed slapo-pcache caching invalid entries (ITS#5927)
Fixed slapo-syncprov csn updates (ITS#5969)
Fixed slapo-rwm objectClass preservation (ITS#5760) Fixed slapo-rwm objectClass preservation (ITS#5760)
Fixed slapo-rwm rwm_bva_rewrite handling (ITS#5960) Fixed slapo-rwm rwm_bva_rewrite handling (ITS#5960)
Build Environment Build Environment
......
...@@ -1630,7 +1630,7 @@ syncprov_op_response( Operation *op, SlapReply *rs ) ...@@ -1630,7 +1630,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
{ {
struct berval maxcsn; struct berval maxcsn;
char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE]; char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE];
int do_check = 0, have_psearches, foundit; int do_check = 0, have_psearches, foundit, csn_changed = 0;
/* Update our context CSN */ /* Update our context CSN */
cbuf[0] = '\0'; cbuf[0] = '\0';
...@@ -1662,6 +1662,7 @@ syncprov_op_response( Operation *op, SlapReply *rs ) ...@@ -1662,6 +1662,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
if ( sid == si->si_sids[i] ) { if ( sid == si->si_sids[i] ) {
if ( ber_bvcmp( &maxcsn, &si->si_ctxcsn[i] ) > 0 ) { if ( ber_bvcmp( &maxcsn, &si->si_ctxcsn[i] ) > 0 ) {
ber_bvreplace( &si->si_ctxcsn[i], &maxcsn ); ber_bvreplace( &si->si_ctxcsn[i], &maxcsn );
csn_changed = 1;
} }
break; break;
} }
...@@ -1669,6 +1670,7 @@ syncprov_op_response( Operation *op, SlapReply *rs ) ...@@ -1669,6 +1670,7 @@ syncprov_op_response( Operation *op, SlapReply *rs )
/* It's a new SID for us */ /* It's a new SID for us */
if ( i == si->si_numcsns ) { if ( i == si->si_numcsns ) {
value_add_one( &si->si_ctxcsn, &maxcsn ); value_add_one( &si->si_ctxcsn, &maxcsn );
csn_changed = 1;
si->si_numcsns++; si->si_numcsns++;
si->si_sids = ch_realloc( si->si_sids, si->si_numcsns * si->si_sids = ch_realloc( si->si_sids, si->si_numcsns *
sizeof(int)); sizeof(int));
...@@ -1710,8 +1712,8 @@ syncprov_op_response( Operation *op, SlapReply *rs ) ...@@ -1710,8 +1712,8 @@ syncprov_op_response( Operation *op, SlapReply *rs )
ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock ); ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock );
} }
/* only update consumer ctx if this is the greatest csn */ /* only update consumer ctx if this is a newer csn */
if ( bvmatch( &maxcsn, &op->o_csn )) { if ( csn_changed ) {
opc->sctxcsn = maxcsn; opc->sctxcsn = maxcsn;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment