[Fedora-directory-commits] ldapserver/ldap/servers/plugins/replication repl_extop.c, 1.14, 1.15 replutil.c, 1.13, 1.14
Noriko Hosoi
nhosoi at fedoraproject.org
Thu Dec 4 00:42:20 UTC 2008
Author: nhosoi
Update of /cvs/dirsec/ldapserver/ldap/servers/plugins/replication
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv16573/plugins/replication
Modified Files:
repl_extop.c replutil.c
Log Message:
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.
Index: repl_extop.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/repl_extop.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- repl_extop.c 17 Oct 2008 22:12:47 -0000 1.14
+++ repl_extop.c 4 Dec 2008 00:42:18 -0000 1.15
@@ -837,10 +837,12 @@
{
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;
Index: replutil.c
===================================================================
RCS file: /cvs/dirsec/ldapserver/ldap/servers/plugins/replication/replutil.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- replutil.c 17 Oct 2008 22:12:47 -0000 1.13
+++ replutil.c 4 Dec 2008 00:42:18 -0000 1.14
@@ -709,6 +709,11 @@
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
More information about the Fedora-directory-commits
mailing list