]> git.sur5r.net Git - openldap/commitdiff
ITS#5536 send SID for glued DBs as well as multimaster
authorHoward Chu <hyc@openldap.org>
Thu, 29 May 2008 01:46:19 +0000 (01:46 +0000)
committerHoward Chu <hyc@openldap.org>
Thu, 29 May 2008 01:46:19 +0000 (01:46 +0000)
servers/slapd/syncrepl.c

index 0428dfb3ba4b6121a849af12c2145ede0547e3da..f4981f32e6ef53f6ae3e7494ce07227c4982b45c 100644 (file)
@@ -580,8 +580,10 @@ do_syncrep1(
        ldap_set_option( si->si_ld, LDAP_OPT_TIMELIMIT, &si->si_tlimit );
 
        si->si_syncCookie.rid = si->si_rid;
-       si->si_syncCookie.sid = SLAP_SINGLE_SHADOW( si->si_be ) ? -1 :
-               slap_serverID;
+
+       /* whenever there are multiple data sources possible, advertise sid */
+       si->si_syncCookie.sid = ( SLAP_MULTIMASTER( si->si_be ) || SLAP_GLUE_SUBORDINATE( si->si_be ) ||
+               SLAP_GLUE_INSTANCE( si->si_be )) ? slap_serverID : -1;
 
        /* We've just started up, or the remote server hasn't sent us
         * any meaningful state.