diff options
| author | Noriko Hosoi <nhosoi@redhat.com> | 2010-09-12 21:59:29 -0700 |
|---|---|---|
| committer | Noriko Hosoi <nhosoi@redhat.com> | 2010-09-13 10:06:51 -0700 |
| commit | 80ce631a97977c273a56b5d4d7e99a7eaf109d57 (patch) | |
| tree | 75207bb0b02a57485d87efedabfcc2fe243eeb06 /ldap/servers/slapd/plugin.c | |
| parent | 2a25e6518f6e2bd83dd4750bf023d332edef2063 (diff) | |
| download | ds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.tar.gz ds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.tar.xz ds-80ce631a97977c273a56b5d4d7e99a7eaf109d57.zip | |
Bug 633168 - Share backend dbEnv with the replication changelog
https://bugzilla.redhat.com/show_bug.cgi?id=633168
Description:
* cl5_api.c, cl5_api.h
- fetches dbEnv from backend using slapi_back_get_info.
- unused macros and DB helper functions and APIs are removed.
* cl5_config.c
- local changelog DB related config parameters are removed.
* Added SLAPI_PLUGIN_BE_PRE_CLOSE_FN and SLAPI_PLUGIN_BE_POST_OPEN_FN to
close changelog DB before dbEnv is closed and to open changelog DB after
dbEnv is opened, respectively.
* Added slapi APIs slapi_back_get_info and slapi_back_set_info to get/set
the backend info.
* back-ldbm
- db2bak[.pl] and bak2db[.pl] backs up and restores the database files
including changelog db.
- changelog dir is backed up in <backupdir>/.repl_changelog_backup.
- underlying implementation ldbm_back_get_info for slapi_back_get_info
is added.
* Added an upgrade script 81changelog.pl
See also:
http://directory.fedoraproject.org/wiki/Move_changelog
Diffstat (limited to 'ldap/servers/slapd/plugin.c')
| -rw-r--r-- | ldap/servers/slapd/plugin.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ldap/servers/slapd/plugin.c b/ldap/servers/slapd/plugin.c index e283a276..aa544269 100644 --- a/ldap/servers/slapd/plugin.c +++ b/ldap/servers/slapd/plugin.c @@ -347,6 +347,7 @@ plugin_call_plugins( Slapi_PBlock *pb, int whichfunction ) case SLAPI_PLUGIN_BE_PRE_MODRDN_FN: case SLAPI_PLUGIN_BE_PRE_ADD_FN: case SLAPI_PLUGIN_BE_PRE_DELETE_FN: + case SLAPI_PLUGIN_BE_PRE_CLOSE_FN: plugin_list_number= PLUGIN_LIST_BEPREOPERATION; do_op = 1; /* always allow backend callbacks (even during startup) */ break; @@ -354,6 +355,7 @@ plugin_call_plugins( Slapi_PBlock *pb, int whichfunction ) case SLAPI_PLUGIN_BE_POST_MODRDN_FN: case SLAPI_PLUGIN_BE_POST_ADD_FN: case SLAPI_PLUGIN_BE_POST_DELETE_FN: + case SLAPI_PLUGIN_BE_POST_OPEN_FN: plugin_list_number= PLUGIN_LIST_BEPOSTOPERATION; do_op = 1; /* always allow backend callbacks (even during startup) */ break; @@ -2403,8 +2405,12 @@ plugin_invoke_plugin_pb (struct slapdplugin *plugin, int operation, Slapi_PBlock PR_ASSERT (pb); /* we always allow initialization and cleanup operations */ - if (operation == SLAPI_PLUGIN_START_FN || operation == SLAPI_PLUGIN_POSTSTART_FN || - operation == SLAPI_PLUGIN_CLOSE_FN || operation == SLAPI_PLUGIN_CLEANUP_FN) + if (operation == SLAPI_PLUGIN_START_FN || + operation == SLAPI_PLUGIN_POSTSTART_FN || + operation == SLAPI_PLUGIN_CLOSE_FN || + operation == SLAPI_PLUGIN_CLEANUP_FN || + operation == SLAPI_PLUGIN_BE_PRE_CLOSE_FN || + operation == SLAPI_PLUGIN_BE_POST_OPEN_FN) return PR_TRUE; PR_ASSERT (pb->pb_op); |
