]> git.sur5r.net Git - openldap/commitdiff
ITS#7849 make sure to send cookie after fallback
authorHoward Chu <hyc@openldap.org>
Fri, 23 May 2014 13:56:56 +0000 (06:56 -0700)
committerQuanah Gibson-Mount <quanah@openldap.org>
Thu, 29 May 2014 18:01:40 +0000 (13:01 -0500)
servers/slapd/syncrepl.c

index 9b5c0f3fa911a7380ab4fe7bebe3225d81424972..836adf1ed65fc9e0a9d422bd5ded595a92c4fec0 100644 (file)
@@ -1538,6 +1538,10 @@ reload:
                op->o_ndn = op->o_bd->be_rootndn;
                rc = do_syncrep2( op, si );
                if ( rc == LDAP_SYNC_REFRESH_REQUIRED ) {
+                       if ( BER_BVISNULL( &si->si_syncCookie.octet_str ))
+                               slap_compose_sync_cookie( NULL, &si->si_syncCookie.octet_str,
+                                       si->si_syncCookie.ctxcsn, si->si_syncCookie.rid,
+                                       si->si_syncCookie.sid );
                        rc = ldap_sync_search( si, op->o_tmpmemctx );
                        goto reload;
                }