|
|
@@ -368,6 +368,25 @@ agmtlist_modify_callback(Slapi_PBlock *pb, Slapi_Entry *entryBefore, Slapi_Entry
|
|
|
rc = SLAPI_DSE_CALLBACK_ERROR;
|
|
|
}
|
|
|
}
|
|
|
+ else if (slapi_attr_types_equivalent(mods[i]->mod_type, type_nsds5ReplicaHost))
|
|
|
+ {
|
|
|
+ /* New replica host */
|
|
|
+ if (agmt_set_host_from_entry(agmt, e) != 0)
|
|
|
+ {
|
|
|
+ slapi_log_error(SLAPI_LOG_REPL, repl_plugin_name,
|
|
|
+ "agmtlist_modify_callback: "
|
|
|
+ "failed to update host for agreement %s\n",
|
|
|
+ agmt_get_long_name(agmt));
|
|
|
+ *returncode = LDAP_OPERATIONS_ERROR;
|
|
|
+ rc = SLAPI_DSE_CALLBACK_ERROR;
|
|
|
+ } else {
|
|
|
+ /*
|
|
|
+ * Changing the host invalidates the agmt maxcsn, so remove it.
|
|
|
+ * The next update will add the correct maxcsn back to the agmt/local ruv.
|
|
|
+ */
|
|
|
+ agmt_remove_maxcsn(agmt);
|
|
|
+ }
|
|
|
+ }
|
|
|
else if (slapi_attr_types_equivalent(mods[i]->mod_type,
|
|
|
type_nsds5ReplicaPort))
|
|
|
{
|