Diff for /servers/slapd/overlays/syncprov.c between versions 1.43 and 1.44

version 1.43, 2004/12/07 09:43:48 version 1.44, 2004/12/07 17:52:55
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.42 2004/12/07 09:05:24 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.43 2004/12/07 09:43:48 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 586  syncprov_findcsn( Operation *op, int mod Line 586  syncprov_findcsn( Operation *op, int mod
         char buf[LDAP_LUTIL_CSNSTR_BUFSIZE + STRLENOF("(entryCSN<=)")];          char buf[LDAP_LUTIL_CSNSTR_BUFSIZE + STRLENOF("(entryCSN<=)")];
         char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE];          char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE];
         struct berval fbuf, maxcsn;          struct berval fbuf, maxcsn;
         Filter cf;          Filter cf, af;
         AttributeAssertion eq;          AttributeAssertion eq;
         int i, rc = LDAP_SUCCESS;          int i, rc = LDAP_SUCCESS;
         fpres_cookie pcookie;          fpres_cookie pcookie;
Line 608  syncprov_findcsn( Operation *op, int mod Line 608  syncprov_findcsn( Operation *op, int mod
         cf.f_av_desc = slap_schema.si_ad_entryCSN;          cf.f_av_desc = slap_schema.si_ad_entryCSN;
         cf.f_next = NULL;          cf.f_next = NULL;
   
           fop.o_callback = &cb;
           fop.ors_limit = NULL;
           fop.ors_tlimit = SLAP_NO_LIMIT;
           fop.ors_filter = &cf;
           fop.ors_filterstr = fbuf;
   
         switch( mode ) {          switch( mode ) {
         case FIND_MAXCSN:          case FIND_MAXCSN:
                 cf.f_choice = LDAP_FILTER_GE;                  cf.f_choice = LDAP_FILTER_GE;
Line 634  syncprov_findcsn( Operation *op, int mod Line 640  syncprov_findcsn( Operation *op, int mod
                 cb.sc_response = findcsn_cb;                  cb.sc_response = findcsn_cb;
                 break;                  break;
         case FIND_PRESENT:          case FIND_PRESENT:
                   af.f_choice = LDAP_FILTER_AND;
                   af.f_next = NULL;
                   af.f_and = &cf;
                 cf.f_choice = LDAP_FILTER_LE;                  cf.f_choice = LDAP_FILTER_LE;
                 cf.f_av_value = *srs->sr_state.ctxcsn;                  cf.f_av_value = *srs->sr_state.ctxcsn;
                 fbuf.bv_len = sprintf( buf, "(entryCSN<=%s)",                  cf.f_next = op->ors_filter;
                         cf.f_av_value.bv_val );                  fop.ors_filter = &af;
                   filter2bv_x( &fop, fop.ors_filter, &fop.ors_filterstr );
                 fop.ors_attrsonly = 0;                  fop.ors_attrsonly = 0;
                 fop.ors_attrs = uuid_anlist;                  fop.ors_attrs = uuid_anlist;
                 fop.ors_slimit = SLAP_NO_LIMIT;                  fop.ors_slimit = SLAP_NO_LIMIT;
Line 660  syncprov_findcsn( Operation *op, int mod Line 670  syncprov_findcsn( Operation *op, int mod
                 }                  }
                 break;                  break;
         }          }
         fop.o_callback = &cb;  
         fop.ors_limit = NULL;  
         fop.ors_tlimit = SLAP_NO_LIMIT;  
         fop.ors_filter = &cf;  
         fop.ors_filterstr = fbuf;  
   
         fop.o_bd->bd_info = on->on_info->oi_orig;          fop.o_bd->bd_info = on->on_info->oi_orig;
         fop.o_bd->be_search( &fop, &frs );          fop.o_bd->be_search( &fop, &frs );
Line 683  syncprov_findcsn( Operation *op, int mod Line 688  syncprov_findcsn( Operation *op, int mod
                 break;                  break;
         case FIND_PRESENT:          case FIND_PRESENT:
                 op->o_tmpfree( pcookie.uuids, op->o_tmpmemctx );                  op->o_tmpfree( pcookie.uuids, op->o_tmpmemctx );
                   op->o_tmpfree( fop.ors_filterstr.bv_val, op->o_tmpmemctx );
                 break;                  break;
         }          }
   

Removed from v.1.43  
changed lines
  Added in v.1.44


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