Diff for /servers/slapd/overlays/syncprov.c between versions 1.56.2.33 and 1.56.2.34

version 1.56.2.33, 2006/05/27 09:01:06 version 1.56.2.34, 2006/07/28 22:11:19
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.56.2.32 2006/05/15 15:51:59 kurt Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.56.2.33 2006/05/27 09:01:06 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 1244  syncprov_checkpoint( Operation *op, Slap Line 1244  syncprov_checkpoint( Operation *op, Slap
         struct berval bv[2];          struct berval bv[2];
         slap_callback cb = {0};          slap_callback cb = {0};
   
         mod.sml_values = bv;          /* If ctxcsn is empty, delete it */
         bv[1].bv_val = NULL;          if ( BER_BVISEMPTY( &si->si_ctxcsn )) {
         bv[0] = si->si_ctxcsn;                  mod.sml_values = NULL;
           } else {
                   mod.sml_values = bv;
                   bv[1].bv_val = NULL;
                   bv[0] = si->si_ctxcsn;
           }
         mod.sml_nvalues = NULL;          mod.sml_nvalues = NULL;
         mod.sml_desc = slap_schema.si_ad_contextCSN;          mod.sml_desc = slap_schema.si_ad_contextCSN;
         mod.sml_op = LDAP_MOD_REPLACE;          mod.sml_op = LDAP_MOD_REPLACE;
Line 1366  syncprov_playlog( Operation *op, SlapRep Line 1371  syncprov_playlog( Operation *op, SlapRep
                         i++;                          i++;
                         AC_MEMCPY( cbuf, se->se_csn.bv_val, se->se_csn.bv_len );                          AC_MEMCPY( cbuf, se->se_csn.bv_val, se->se_csn.bv_len );
                         delcsn.bv_len = se->se_csn.bv_len;                          delcsn.bv_len = se->se_csn.bv_len;
                           delcsn.bv_val[delcsn.bv_len] = '\0';
                 } else {                  } else {
                         nmods++;                          nmods++;
                         j = num - nmods;                          j = num - nmods;
Line 2326  syncprov_db_open( Line 2332  syncprov_db_open(
         int rc;          int rc;
         void *thrctx = NULL;          void *thrctx = NULL;
   
           if ( !SLAP_LASTMOD( be )) {
                   Debug( LDAP_DEBUG_ANY,
                           "syncprov_db_open: invalid config, lastmod must be enabled\n", 0, 0, 0 );
                   return -1;
           }
   
         if ( slapMode & SLAP_TOOL_MODE ) {          if ( slapMode & SLAP_TOOL_MODE ) {
                 return 0;                  return 0;
         }          }
Line 2369  syncprov_db_open( Line 2381  syncprov_db_open(
                         ldap_pvt_thread_create( &tid, 0, syncprov_db_otask, op );                          ldap_pvt_thread_create( &tid, 0, syncprov_db_otask, op );
                         ldap_pvt_thread_join( tid, NULL );                          ldap_pvt_thread_join( tid, NULL );
                 }                  }
         } else if ( SLAP_SYNC_SHADOW( op->o_bd )) {  
                 /* If we're also a consumer, and we didn't find the context entry,  
                  * then don't generate anything, wait for our provider to send it  
                  * to us.  
                  */  
                 goto out;  
         }          }
   
         if ( BER_BVISEMPTY( &si->si_ctxcsn ) ) {          if ( BER_BVISEMPTY( &si->si_ctxcsn ) ) {
                   if ( SLAP_SYNC_SHADOW( op->o_bd )) {
                   /* If we're also a consumer, and we didn't get a contextCSN,
                    * then don't generate anything, wait for our provider to send it
                    * to us.
                    */
                           goto out;
                   }
                 si->si_ctxcsn.bv_len = sizeof( si->si_ctxcsnbuf );                  si->si_ctxcsn.bv_len = sizeof( si->si_ctxcsnbuf );
                 slap_get_csn( op, &si->si_ctxcsn, 0 );                  slap_get_csn( op, &si->si_ctxcsn, 0 );
         }          }

Removed from v.1.56.2.33  
changed lines
  Added in v.1.56.2.34


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