(verson 2.4.17)

 

This code is in syncrepl.c

 

                  /* Don't send changed entries back to the originator */

                  if ( sid == srs->sr_state.sid && srs->sr_state.numcsns ) {

                        Debug( LDAP_DEBUG_SYNC,

                              "Entry %s changed by peer, ignored\n",

                              rs->sr_entry->e_name.bv_val, 0, 0 );

                        return LDAP_SUCCESS;

 

 

Can someone explain to me what the intention of this code is?  I can read the comment, but it looks to me like the condition for the if is broken.

 

I think it is saying – if (the system id of the modification is “this system”) and (there was a sync cookie found at startup) then discard the update

 

The longer I look at this, the less I’m convinced that the condition check matches what the comment says it does.  Any comments?