Diff for /servers/slapd/overlays/syncprov.c between versions 1.147.2.2 and 1.156

version 1.147.2.2, 2006/08/17 23:50:32 version 1.156, 2006/08/15 07:28:25
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.147.2.1 2006/05/15 17:04:44 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.154 2006/07/28 00:40:38 hyc Exp $ */
 /* syncprov.c - syncrepl provider */  /* syncprov.c - syncrepl provider */
 /* This work is part of OpenLDAP Software <http://www.openldap.org/>.  /* This work is part of OpenLDAP Software <http://www.openldap.org/>.
  *   *
Line 65  typedef struct syncops { Line 65  typedef struct syncops {
 #define PS_IS_DETACHED          0x02  #define PS_IS_DETACHED          0x02
 #define PS_WROTE_BASE           0x04  #define PS_WROTE_BASE           0x04
 #define PS_FIND_BASE            0x08  #define PS_FIND_BASE            0x08
 #define PS_FIX_FILTER           0x10  
   
         int             s_inuse;        /* reference count */          int             s_inuse;        /* reference count */
         struct syncres *s_res;          struct syncres *s_res;
Line 1793  syncprov_detach_op( Operation *op, synco Line 1792  syncprov_detach_op( Operation *op, synco
         op2->ors_filterstr.bv_val = ptr;          op2->ors_filterstr.bv_val = ptr;
         strcpy( ptr, so->s_filterstr.bv_val );          strcpy( ptr, so->s_filterstr.bv_val );
         op2->ors_filterstr.bv_len = so->s_filterstr.bv_len;          op2->ors_filterstr.bv_len = so->s_filterstr.bv_len;
           op2->ors_filter = filter_dup( op->ors_filter, NULL );
         /* Skip the AND/GE clause that we stuck on in front */  
         if ( so->s_flags & PS_FIX_FILTER ) {  
                 op2->ors_filter = op->ors_filter->f_and->f_next;  
                 so->s_flags ^= PS_FIX_FILTER;  
         } else {  
                 op2->ors_filter = op->ors_filter;  
         }  
         op2->ors_filter = filter_dup( op2->ors_filter, NULL );  
         so->s_op = op2;          so->s_op = op2;
   
         /* Copy any cached group ACLs individually */          /* Copy any cached group ACLs individually */
Line 1893  syncprov_search_response( Operation *op, Line 1884  syncprov_search_response( Operation *op,
                         op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );                          op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
                 } else {                  } else {
                 /* It's RefreshAndPersist, transition to Persist phase */                  /* It's RefreshAndPersist, transition to Persist phase */
                         syncprov_sendinfo( op, rs, ss->ss_present ?                          syncprov_sendinfo( op, rs, ( ss->ss_present && rs->sr_nentries ) ?
                                 LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE,                                  LDAP_TAG_SYNC_REFRESH_PRESENT : LDAP_TAG_SYNC_REFRESH_DELETE,
                                 &cookie, 1, NULL, 0 );                                  &cookie, 1, NULL, 0 );
                         op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );                          op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx );
Line 2073  shortcut: Line 2064  shortcut:
                 fava->f_next = op->ors_filter;                  fava->f_next = op->ors_filter;
                 op->ors_filter = fand;                  op->ors_filter = fand;
                 filter2bv_x( op, op->ors_filter, &op->ors_filterstr );                  filter2bv_x( op, op->ors_filter, &op->ors_filterstr );
                 if ( sop )  
                         sop->s_flags |= PS_FIX_FILTER;  
         }          }
   
         /* Let our callback add needed info to returned entries */          /* Let our callback add needed info to returned entries */

Removed from v.1.147.2.2  
changed lines
  Added in v.1.156


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org