From 12764c67785de77b45a40df5f38f756adb91bdca Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 30 Apr 2008 13:10:18 +0200 Subject: [PATCH] Call the shutdown function of the plugin before closing. --- src/vio/csync_vio.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/vio/csync_vio.c b/src/vio/csync_vio.c index b6fed596e..ef567909c 100644 --- a/src/vio/csync_vio.c +++ b/src/vio/csync_vio.c @@ -106,6 +106,12 @@ int csync_vio_init(CSYNC *ctx, const char *module, const char *args) { void csync_vio_shutdown(CSYNC *ctx) { if (ctx->module.handle != NULL) { + /* shutdown the plugin */ + if (ctx->module.finish_fn != NULL) { + (*ctx->module.finish_fn)(ctx->module.method); + } + + /* close the plugin */ dlclose(ctx->module.handle); ctx->module.handle = NULL;