ldap/servers/plugins/replication/repl_session_plugin.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit 3880411360a9f2a47629ef30e2878d89ebe0fc02
Author: Rich Megginson <rmeggins(a)redhat.com>
Date: Fri May 21 11:27:51 2010 -0600
Repl Session API needs to check for NULL api before init
The new repl sesssion API will crash when adding a replication agreement.
It should check to see if there is a repl session api before attempting
to get the init function.
Reviewed by: nhosoi
Branch: HEAD
Platforms tested: RHEL5 x86_64
diff --git a/ldap/servers/plugins/replication/repl_session_plugin.c b/ldap/servers/plugins/replication/repl_session_plugin.c
index 0e5b6ce..0da2b78 100644
--- a/ldap/servers/plugins/replication/repl_session_plugin.c
+++ b/ldap/servers/plugins/replication/repl_session_plugin.c
@@ -72,7 +72,9 @@ repl_session_plugin_call_agmt_init_cb(Repl_Agmt *ra)
LDAPDebug0Args( LDAP_DEBUG_PLUGIN, "--> repl_session_plugin_call_agmt_init_cb -- begin\n");
- initfunc = (repl_session_plugin_agmt_init_cb)_ReplSessionAPI[REPL_SESSION_PLUGIN_AGMT_INIT_CB];
+ if (_ReplSessionAPI) {
+ initfunc = (repl_session_plugin_agmt_init_cb)_ReplSessionAPI[REPL_SESSION_PLUGIN_AGMT_INIT_CB];
+ }
if (initfunc) {
replarea = agmt_get_replarea(ra);
cookie = (*initfunc)(replarea);