Diff for /servers/slapd/overlays/syncprov.c between versions 1.55 and 1.56

version 1.55, 2004/12/10 01:51:34 version 1.56, 2004/12/10 02:18:33
Line 1 Line 1
 /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.54 2004/12/10 00:50:16 hyc Exp $ */  /* $OpenLDAP: pkg/ldap/servers/slapd/overlays/syncprov.c,v 1.55 2004/12/10 01:51:34 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 1761  syncprov_op_search( Operation *op, SlapR Line 1761  syncprov_op_search( Operation *op, SlapR
         /* If we have a cookie, handle the PRESENT lookups */          /* If we have a cookie, handle the PRESENT lookups */
         if ( srs->sr_state.ctxcsn ) {          if ( srs->sr_state.ctxcsn ) {
                 sessionlog *sl;                  sessionlog *sl;
                 int valid = 0;  
   
                 /* Is the CSN in a valid format? */                  /* The cookie was validated when it was parsed, just use it */
                 /* FIXME: should use csnValidate when that is implemented */  
                 while (!valid) {  
                         char *ptr;  
                         struct berval timestamp;  
                         slap_syntax_validate_func *validate;  
                         AttributeDescription *ad = slap_schema.si_ad_modifyTimestamp;  
   
                         if ( srs->sr_state.ctxcsn->bv_len >= LDAP_LUTIL_CSNSTR_BUFSIZE )  
                                 break;  
                         ptr = strchr( srs->sr_state.ctxcsn->bv_val, '#' );  
                         if ( !ptr )  
                                 break;  
                         timestamp.bv_val = srs->sr_state.ctxcsn->bv_val;  
                         timestamp.bv_len = ptr - timestamp.bv_val;  
                         validate = ad->ad_type->sat_syntax->ssyn_validate;  
                         if ( validate( ad->ad_type->sat_syntax, &timestamp ))  
                                 break;  
                         valid = 1;  
                         break;  
                 }  
                 /* Skip any present searches, there's nothing to compare */  
                 if ( !valid ) {  
                         goto shortcut;  
                 }  
                 /* If just Refreshing and nothing has changed, shortcut it */                  /* If just Refreshing and nothing has changed, shortcut it */
                 if ( bvmatch( srs->sr_state.ctxcsn, &ctxcsn )) {                  if ( bvmatch( srs->sr_state.ctxcsn, &ctxcsn )) {
                         nochange = 1;                          nochange = 1;

Removed from v.1.55  
changed lines
  Added in v.1.56


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