summaryrefslogtreecommitdiffstats
path: root/ldap/servers/plugins/replication
diff options
context:
space:
mode:
authorNoriko Hosoi <nhosoi@redhat.com>2008-12-04 00:42:18 +0000
committerNoriko Hosoi <nhosoi@redhat.com>2008-12-04 00:42:18 +0000
commit1bf6bfb757bb9c6edd1ed9342953a16453ed2d12 (patch)
tree9d28e472d48890c0f54d8ed9853c8b3e0628e40b /ldap/servers/plugins/replication
parent54f9cd4a5bc82a468b3dad8c6dc1e8db5a21cfa5 (diff)
downloadds-1bf6bfb757bb9c6edd1ed9342953a16453ed2d12.tar.gz
ds-1bf6bfb757bb9c6edd1ed9342953a16453ed2d12.tar.xz
ds-1bf6bfb757bb9c6edd1ed9342953a16453ed2d12.zip
Resolves: #474248
Summary: Replica crashes in the consumer initialization if the backend to be replicated does not exist Description: . mapping_tree.c: if NULL mapping tree state is passed, return an error. . repl_extop.c: if mapping tree node state is NULL, don't reset the mapping tree state. . replutil.c: if NULL mapping tree state is passed, log it and return.
Diffstat (limited to 'ldap/servers/plugins/replication')
-rw-r--r--ldap/servers/plugins/replication/repl_extop.c8
-rw-r--r--ldap/servers/plugins/replication/replutil.c5
2 files changed, 10 insertions, 3 deletions
diff --git a/ldap/servers/plugins/replication/repl_extop.c b/ldap/servers/plugins/replication/repl_extop.c
index b286f209..e9d5af47 100644
--- a/ldap/servers/plugins/replication/repl_extop.c
+++ b/ldap/servers/plugins/replication/repl_extop.c
@@ -837,10 +837,12 @@ multimaster_extop_StartNSDS50ReplicationRequest(Slapi_PBlock *pb)
{
response = NSDS50_REPL_INTERNAL_ERROR;
/* reset the mapping tree state to what it was before
- we tried to do the bulk import */
- repl_set_mtn_state_and_referrals(repl_root_sdn, mtnstate,
+ we tried to do the bulk import if mtnstate exists */
+ if (mtnstate) {
+ repl_set_mtn_state_and_referrals(repl_root_sdn, mtnstate,
NULL, NULL, mtnreferral);
- slapi_ch_free_string(&mtnstate);
+ slapi_ch_free_string(&mtnstate);
+ }
charray_free(mtnreferral);
mtnreferral = NULL;
diff --git a/ldap/servers/plugins/replication/replutil.c b/ldap/servers/plugins/replication/replutil.c
index 544ac116..6e6fd63d 100644
--- a/ldap/servers/plugins/replication/replutil.c
+++ b/ldap/servers/plugins/replication/replutil.c
@@ -709,6 +709,11 @@ repl_set_mtn_state_and_referrals(
int ii = 0;
char **referrals_to_set = NULL;
PRBool chain_on_update = is_chain_on_update_setup(repl_root_sdn);
+ if (NULL == mtn_state) {
+ slapi_log_error(SLAPI_LOG_FATAL, repl_plugin_name,
+ "repl_set_mtn_referrals: cannot set NULL state.\n");
+ return;
+ }
/* Fix for blackflag bug 601440: We want the new behaviour of DS,
** going forward, to now be that if the nsds5replicareferral attrib