[389-devel] Please review: Repl Session API needs to check for NULL api before init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





>From d8234c6633eb1e371fd0590180cd247e87bb0784 Mon Sep 17 00:00:00 2001
From: Rich Megginson <rmeggins@xxxxxxxxxx>
Date: Fri, 21 May 2010 11:27:51 -0600
Subject: [PATCH] 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: ???
Branch: HEAD
Platforms tested: RHEL5 x86_64
---
 .../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 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);
-- 
1.5.5.6

--
389-devel mailing list
389-devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/389-devel

[Index of Archives]     [Fedora Directory Announce]     [Fedora Users]     [Older Fedora Users Mail]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Review]     [Fedora Art]     [Fedora Music]     [Fedora Packaging]     [CentOS]     [Fedora SELinux]     [Big List of Linux Books]     [KDE Users]     [Fedora Art]     [Fedora Docs]

  Powered by Linux