summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ldap/servers/plugins/replication/repl5_replica.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/ldap/servers/plugins/replication/repl5_replica.c b/ldap/servers/plugins/replication/repl5_replica.c
index a563835a..f669900f 100644
--- a/ldap/servers/plugins/replication/repl5_replica.c
+++ b/ldap/servers/plugins/replication/repl5_replica.c
@@ -2104,6 +2104,9 @@ _replica_update_state (time_t when, void *arg)
LDAPMod *mods[3];
Slapi_PBlock *pb = NULL;
char *dn = NULL;
+ struct berval *vals[2];
+ struct berval val;
+ LDAPMod mod;
if (NULL == replica_name)
return;
@@ -2173,13 +2176,9 @@ _replica_update_state (time_t when, void *arg)
/* write replica name if it has not been written before */
if (r->new_name)
{
- struct berval *vals[2];
- struct berval val;
- LDAPMod mod;
-
mods[1] = &mod;
- mod.mod_op = LDAP_MOD_REPLACE;
+ mod.mod_op = LDAP_MOD_REPLACE|LDAP_MOD_BVALUES;
mod.mod_type = (char*)attr_replicaName;
mod.mod_bvalues = vals;
vals [0] = &val;