From: Howard Chu Date: Mon, 8 Oct 2007 18:13:29 +0000 (+0000) Subject: ITS#5177 pass new entries in search_response for Persist mode X-Git-Tag: OPENLDAP_REL_ENG_2_4_9~20^2~530 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=a79bc9195da2f70cbfa1b891dcf73fc7c93a400c;p=openldap ITS#5177 pass new entries in search_response for Persist mode --- diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index bc02e019c5..dcaf481751 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -1968,16 +1968,20 @@ syncprov_search_response( Operation *op, SlapReply *rs ) rs->sr_entry->e_name.bv_val, 0, 0 ); return LDAP_SUCCESS; } - /* Make sure entry is less than the snapshot'd contextCSN */ - for ( i=0; iss_numcsns; i++ ) { - if ( sid == ss->ss_sids[i] && ber_bvcmp( &a->a_nvals[0], - &ss->ss_ctxcsn[i] ) > 0 ) { - Debug( LDAP_DEBUG_SYNC, - "Entry %s CSN %s greater than snapshot %s\n", - rs->sr_entry->e_name.bv_val, - a->a_nvals[0].bv_val, - ss->ss_ctxcsn[i].bv_val ); - return LDAP_SUCCESS; + + /* If not a persistent search */ + if ( !ss->ss_so ) { + /* Make sure entry is less than the snapshot'd contextCSN */ + for ( i=0; iss_numcsns; i++ ) { + if ( sid == ss->ss_sids[i] && ber_bvcmp( &a->a_nvals[0], + &ss->ss_ctxcsn[i] ) > 0 ) { + Debug( LDAP_DEBUG_SYNC, + "Entry %s CSN %s greater than snapshot %s\n", + rs->sr_entry->e_name.bv_val, + a->a_nvals[0].bv_val, + ss->ss_ctxcsn[i].bv_val ); + return LDAP_SUCCESS; + } } }