From: Pierangelo Masarati Date: Mon, 29 Nov 2004 19:03:55 +0000 (+0000) Subject: glue also in case of no such object, indicating that the suffix entry is missing... X-Git-Tag: OPENLDAP_REL_ENG_2_3_0ALPHA~178 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9114b1b1162c529825fe08c55ade1c5383070f2c;p=openldap glue also in case of no such object, indicating that the suffix entry is missing yet (unordered results of initial content poll) --- 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;