diff options
author | Rich Megginson <rmeggins@redhat.com> | 2010-05-21 11:27:51 -0600 |
---|---|---|
committer | Rich Megginson <rmeggins@redhat.com> | 2010-05-21 11:34:01 -0600 |
commit | 3880411360a9f2a47629ef30e2878d89ebe0fc02 (patch) | |
tree | 5934c3d6590aed0c6411246487b842cfbfb88fe5 /ldap | |
parent | 6f0705102374bcff44c24f0d90e7fb4c70e646df (diff) | |
download | ds-bug515329.py.tar.gz ds-bug515329.py.tar.xz ds-bug515329.py.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
Diffstat (limited to 'ldap')
-rw-r--r-- | ldap/servers/plugins/replication/repl_session_plugin.c | 4 |
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); |