diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map.h | 1 | ||||
-rw-r--r-- | src/plug-nis.c | 1 | ||||
-rw-r--r-- | src/plug-sch.c | 11 |
3 files changed, 13 insertions, 0 deletions
@@ -26,6 +26,7 @@ struct slapi_pblock; /* Functions to pull data out of maps. */ int map_startup(struct plugin_state *state); int map_init(struct slapi_pblock *pb, struct plugin_state *state); +void map_done(struct plugin_state *state); int map_master_name(struct plugin_state *state, const char **master); bool_t map_supports_domain(struct plugin_state *state, const char *domain, diff --git a/src/plug-nis.c b/src/plug-nis.c index 514f63f..1bd6c19 100644 --- a/src/plug-nis.c +++ b/src/plug-nis.c @@ -142,6 +142,7 @@ plugin_shutdown(Slapi_PBlock *pb) state->pmap_client_socket, YPPROG, YPVERS); } wrap_stop_thread(state->tid); + map_done(state); free(state); return 0; } diff --git a/src/plug-sch.c b/src/plug-sch.c index 6bd8f33..a889bc8 100644 --- a/src/plug-sch.c +++ b/src/plug-sch.c @@ -114,6 +114,16 @@ plugin_startup(Slapi_PBlock *pb) } static int +plugin_shutdown(Slapi_PBlock *pb) +{ + struct plugin_state *state; + slapi_pblock_get(pb, SLAPI_PLUGIN_PRIVATE, &state); + map_done(state); + free(state); + return 0; +} + +static int schema_compat_plugin_init_preop(Slapi_PBlock *pb) { slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_03); @@ -145,6 +155,7 @@ schema_compat_plugin_init(Slapi_PBlock *pb) slapi_pblock_set(pb, SLAPI_PLUGIN_VERSION, SLAPI_PLUGIN_VERSION_03); slapi_pblock_set(pb, SLAPI_PLUGIN_DESCRIPTION, &plugin_description); slapi_pblock_set(pb, SLAPI_PLUGIN_START_FN, &plugin_startup); + slapi_pblock_set(pb, SLAPI_PLUGIN_CLOSE_FN, &plugin_shutdown); slapi_pblock_set(pb, SLAPI_PLUGIN_PRIVATE, state); /* Let the backend do its setup. */ map_init(pb, state); |