From 9114b1b1162c529825fe08c55ade1c5383070f2c Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 29 Nov 2004 19:03:55 +0000 Subject: [PATCH] glue also in case of no such object, indicating that the suffix entry is missing yet (unordered results of initial content poll) --- servers/slapd/syncrepl.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 7a492a0756..756eb62cc3 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -1347,22 +1347,28 @@ syncrepl_entry( Debug( LDAP_DEBUG_SYNC, "syncrepl_entry: %s (%d)\n", "be_add", rc, 0 ); - if ( rs_add.sr_err == LDAP_SUCCESS ) { + switch ( rs_add.sr_err ) { + case LDAP_SUCCESS: be_entry_release_w( op, entry ); ret = 0; - goto done; - } - if ( rs_add.sr_err == LDAP_REFERRAL ) { + break; + + case LDAP_REFERRAL: + /* we assume that LDAP_NO_SUCH_OBJECT is returned + * only if the suffix entry is not present */ + case LDAP_NO_SUCH_OBJECT: syncrepl_add_glue( op, entry ); ret = 0; - goto done; - } else { + break; + + default: Debug( LDAP_DEBUG_ANY, "syncrepl_entry : be_add failed (%d)\n", rs_add.sr_err, 0, 0 ); ret = 1; - goto done; + break; } + goto done; } /* FALLTHRU */ op->o_req_dn = dni.dn; -- 2.39.5