diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:34:56 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:34:56 +0000 |
commit | 3fa3e6ac17cbab8003ce3b3ae87928de5f5eaaf4 (patch) | |
tree | 1fa47166862724850b871e1900513bf04d3c1cc2 /servers/slapd/back-meta/add.c | |
parent | Adding upstream version 2.6.7+dfsg. (diff) | |
download | openldap-3fa3e6ac17cbab8003ce3b3ae87928de5f5eaaf4.tar.xz openldap-3fa3e6ac17cbab8003ce3b3ae87928de5f5eaaf4.zip |
Adding upstream version 2.6.8+dfsg.upstream/2.6.8+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | servers/slapd/back-meta/add.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/servers/slapd/back-meta/add.c b/servers/slapd/back-meta/add.c index ec75db1..10adcd7 100644 --- a/servers/slapd/back-meta/add.c +++ b/servers/slapd/back-meta/add.c @@ -1,7 +1,7 @@ /* $OpenLDAP$ */ /* This work is part of OpenLDAP Software <http://www.openldap.org/>. * - * Copyright 1999-2022 The OpenLDAP Foundation. + * Copyright 1999-2024 The OpenLDAP Foundation. * Portions Copyright 2001-2003 Pierangelo Masarati. * Portions Copyright 1999-2003 Howard Chu. * All rights reserved. @@ -47,15 +47,17 @@ meta_back_add( Operation *op, SlapReply *rs ) int msgid; ldap_back_send_t retrying = LDAP_BACK_RETRYING; LDAPControl **ctrls = NULL; - + SlapReply *candidates = NULL; Debug(LDAP_DEBUG_ARGS, "==> meta_back_add: %s\n", op->o_req_dn.bv_val ); /* * get the current connection */ - mc = meta_back_getconn( op, rs, &candidate, LDAP_BACK_SENDERR ); - if ( !mc || !meta_back_dobind( op, rs, mc, LDAP_BACK_SENDERR ) ) { + candidates = meta_back_candidates_get( op ); + mc = meta_back_getconn( op, rs, &candidate, LDAP_BACK_SENDERR, candidates ); + if ( !mc || !meta_back_dobind( op, rs, mc, LDAP_BACK_SENDERR, candidates ) ) { + op->o_tmpfree( candidates, op->o_tmpmemctx ); return rs->sr_err; } @@ -181,7 +183,7 @@ retry:; mt->mt_timeout[ SLAP_OP_ADD ], ( LDAP_BACK_SENDRESULT | retrying ) ); if ( rs->sr_err == LDAP_UNAVAILABLE && retrying ) { retrying &= ~LDAP_BACK_RETRYING; - if ( meta_back_retry( op, rs, &mc, candidate, LDAP_BACK_SENDERR ) ) { + if ( meta_back_retry( op, rs, &mc, candidate, LDAP_BACK_SENDERR, candidates ) ) { /* if the identity changed, there might be need to re-authz */ (void)mi->mi_ldap_extra->controls_free( op, rs, &ctrls ); goto retry; @@ -205,7 +207,7 @@ done:; if ( mc ) { meta_back_release_conn( mi, mc ); } - + op->o_tmpfree( candidates, op->o_tmpmemctx ); return rs->sr_err; } |