summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRich Megginson <rmeggins@redhat.com>2010-05-21 11:27:51 -0600
committerRich Megginson <rmeggins@redhat.com>2010-05-21 11:34:01 -0600
commit3880411360a9f2a47629ef30e2878d89ebe0fc02 (patch)
tree5934c3d6590aed0c6411246487b842cfbfb88fe5
parent6f0705102374bcff44c24f0d90e7fb4c70e646df (diff)
downloadds-3880411360a9f2a47629ef30e2878d89ebe0fc02.tar.gz
ds-3880411360a9f2a47629ef30e2878d89ebe0fc02.tar.xz
ds-3880411360a9f2a47629ef30e2878d89ebe0fc02.zip
Repl Session API needs to check for NULL api before initbug515329.py
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
-rw-r--r--ldap/servers/plugins/replication/repl_session_plugin.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/ldap/servers/plugins/replication/repl_session_plugin.c b/ldap/servers/plugins/replication/repl_session_plugin.c
index 0e5b6ce4..0da2b78c 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);