]> git.sur5r.net Git - openldap/commitdiff
ITS#5177 pass new entries in search_response for Persist mode
authorHoward Chu <hyc@openldap.org>
Mon, 8 Oct 2007 18:13:29 +0000 (18:13 +0000)
committerHoward Chu <hyc@openldap.org>
Mon, 8 Oct 2007 18:13:29 +0000 (18:13 +0000)
servers/slapd/overlays/syncprov.c

index bc02e019c51d2938c56a89c63b21072eb5e6e516..dcaf4817517912d4544a2f05c1afaab8c6e7503b 100644 (file)
@@ -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; i<ss->ss_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; i<ss->ss_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;
+                                       }
                                }
                        }