Diff for /servers/slapd/overlays/syncprov.c between versions 1.10 and 1.11

version 1.10, 2004/11/24 19:34:28 version 1.11, 2004/11/25 17:31:31
Line 146  syncprov_findbase( Operation *op, fbase_ Line 146  syncprov_findbase( Operation *op, fbase_
         cb.sc_response = findbase_cb;          cb.sc_response = findbase_cb;
         cb.sc_private = fc;          cb.sc_private = fc;
   
         fop.o_sync_mode = 0;          fop.o_sync_mode &= SLAP_CONTROL_MASK;   /* turn off sync mode */
         fop.o_callback = &cb;          fop.o_callback = &cb;
         fop.o_tag = LDAP_REQ_SEARCH;          fop.o_tag = LDAP_REQ_SEARCH;
         fop.ors_scope = LDAP_SCOPE_BASE;          fop.ors_scope = LDAP_SCOPE_BASE;
Line 300  syncprov_findcsn( Operation *op, int mod Line 300  syncprov_findcsn( Operation *op, int mod
         }          }
   
         fop = *op;          fop = *op;
         fop.o_sync_mode = 0;          fop.o_sync_mode &= SLAP_CONTROL_MASK;   /* turn off sync_mode */
   
         fbuf.bv_val = buf;          fbuf.bv_val = buf;
         if ( mode == FIND_CSN ) {          if ( mode == FIND_CSN ) {
Line 402  syncprov_sendresp( Operation *op, opcook Line 402  syncprov_sendresp( Operation *op, opcook
         a_uuid.a_nvals = &opc->suuid;          a_uuid.a_nvals = &opc->suuid;
         rs.sr_err = slap_build_sync_state_ctrl( &sop, &rs, &e_uuid,          rs.sr_err = slap_build_sync_state_ctrl( &sop, &rs, &e_uuid,
                 mode, ctrls, 0, 1, &cookie );                  mode, ctrls, 0, 1, &cookie );
   
         rs.sr_entry = e;          rs.sr_entry = e;
         rs.sr_ctrls = ctrls;          rs.sr_ctrls = ctrls;
         switch( mode ) {          switch( mode ) {
Line 710  syncprov_search_cleanup( Operation *op, Line 711  syncprov_search_cleanup( Operation *op,
                 op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );                  op->o_tmpfree( rs->sr_ctrls, op->o_tmpmemctx );
         }          }
         if ( ss->ss_done )          if ( ss->ss_done )
                 op->o_sync_mode = SLAP_SYNC_REFRESH_AND_PERSIST;                  op->o_sync_mode |= SLAP_SYNC_REFRESH_AND_PERSIST;
         return 0;          return 0;
 }  }
   
Line 783  syncprov_op_search( Operation *op, SlapR Line 784  syncprov_op_search( Operation *op, SlapR
         syncops *sop = NULL;          syncops *sop = NULL;
         searchstate *ss;          searchstate *ss;
   
         if ( !op->o_sync_mode ) return SLAP_CB_CONTINUE;          if ( !(op->o_sync_mode & SLAP_SYNC_REFRESH) ) return SLAP_CB_CONTINUE;
   
         if ( op->ors_deref & LDAP_DEREF_SEARCHING ) {          if ( op->ors_deref & LDAP_DEREF_SEARCHING ) {
                 send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "illegal value for derefAliases" );                  send_ldap_error( op, rs, LDAP_PROTOCOL_ERROR, "illegal value for derefAliases" );
Line 791  syncprov_op_search( Operation *op, SlapR Line 792  syncprov_op_search( Operation *op, SlapR
         }          }
   
         /* If this is a persistent search, set it up right away */          /* If this is a persistent search, set it up right away */
         if ( op->o_sync_mode == SLAP_SYNC_REFRESH_AND_PERSIST ) {          if ( op->o_sync_mode & SLAP_SYNC_PERSIST ) {
                 syncops so;                  syncops so;
                 fbase_cookie fc;                  fbase_cookie fc;
                 opcookie opc;                  opcookie opc;
Line 844  syncprov_op_search( Operation *op, SlapR Line 845  syncprov_op_search( Operation *op, SlapR
                         /* If just Refreshing and nothing has changed, shortcut it */                          /* If just Refreshing and nothing has changed, shortcut it */
                         if ( bvmatch( op->o_sync_state.ctxcsn, &si->si_ctxcsn )) {                          if ( bvmatch( op->o_sync_state.ctxcsn, &si->si_ctxcsn )) {
                                 nochange = 1;                                  nochange = 1;
                                 if ( op->o_sync_mode == SLAP_SYNC_REFRESH ) {                                  if ( !(op->o_sync_mode & SLAP_SYNC_PERSIST) ) {
                                         LDAPControl     *ctrls[2];                                          LDAPControl     *ctrls[2];
   
                                         ctrls[0] = NULL;                                          ctrls[0] = NULL;
Line 922  shortcut: Line 923  shortcut:
          * doesn't get invoked. We can skip this after the back-bdb code is           * doesn't get invoked. We can skip this after the back-bdb code is
          * removed, and also delete ss->ss_done.           * removed, and also delete ss->ss_done.
          */           */
         op->o_sync_mode = 0;          op->o_sync_mode &= SLAP_CONTROL_MASK;
   
         /* If this is a persistent search and no changes were reported during          /* If this is a persistent search and no changes were reported during
          * the refresh phase, just invoke the response callback to transition           * the refresh phase, just invoke the response callback to transition

Removed from v.1.10  
changed lines
  Added in v.1.11


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