Commit 30778bda authored by Howard Chu's avatar Howard Chu Committed by Quanah Gibson-Mount
Browse files

ITS#9338 syncrepl: Don't reuse existing connection on Refresh fallback

parent 73085ff0
...@@ -1548,7 +1548,8 @@ done: ...@@ -1548,7 +1548,8 @@ done:
if ( msg ) ldap_msgfree( msg ); if ( msg ) ldap_msgfree( msg );
if ( rc && rc != LDAP_SYNC_REFRESH_REQUIRED && si->si_ld ) { if ( rc ) {
/* never reuse existing connection */
if ( si->si_conn ) { if ( si->si_conn ) {
connection_client_stop( si->si_conn ); connection_client_stop( si->si_conn );
si->si_conn = NULL; si->si_conn = NULL;
...@@ -1661,6 +1662,7 @@ do_syncrepl( ...@@ -1661,6 +1662,7 @@ do_syncrepl(
if ( !si->si_schemachecking ) if ( !si->si_schemachecking )
op->o_no_schema_check = 1; op->o_no_schema_check = 1;
reload:
/* Establish session, do search */ /* Establish session, do search */
if ( !si->si_ld ) { if ( !si->si_ld ) {
si->si_refreshDelete = 0; si->si_refreshDelete = 0;
...@@ -1678,7 +1680,6 @@ do_syncrepl( ...@@ -1678,7 +1680,6 @@ do_syncrepl(
rc = do_syncrep1( op, si ); rc = do_syncrep1( op, si );
} }
reload:
/* Process results */ /* Process results */
if ( rc == LDAP_SUCCESS ) { if ( rc == LDAP_SUCCESS ) {
ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s ); ldap_get_option( si->si_ld, LDAP_OPT_DESC, &s );
...@@ -1689,11 +1690,6 @@ reload: ...@@ -1689,11 +1690,6 @@ reload:
op->o_ndn = op->o_bd->be_rootndn; op->o_ndn = op->o_bd->be_rootndn;
rc = do_syncrep2( op, si ); rc = do_syncrep2( op, si );
if ( rc == LDAP_SYNC_REFRESH_REQUIRED ) { 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; goto reload;
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment