]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
libsmbconf: add shutdown handler to smbconf_ops.
authorMichael Adam <obnox@samba.org>
Fri, 21 Mar 2008 01:01:55 +0000 (02:01 +0100)
committerMichael Adam <obnox@samba.org>
Fri, 21 Mar 2008 01:25:56 +0000 (02:25 +0100)
Michael

source/lib/smbconf/smbconf.c
source/lib/smbconf/smbconf_private.h

index 89fe5585104afba48d8e1d17adfc30018170aa60..82683caa69635e1ad3215fc218792ef3bf9b4735 100644 (file)
@@ -395,7 +395,7 @@ done:
 
 static int smbconf_destroy_ctx(struct smbconf_ctx *ctx)
 {
-       return ctx->ops->close_conf(ctx);
+       return ctx->ops->shutdown(ctx);
 }
 
 static WERROR smbconf_global_check(struct smbconf_ctx *ctx)
@@ -436,6 +436,11 @@ done:
        return werr;
 }
 
+static int smbconf_reg_shutdown(struct smbconf_ctx *ctx)
+{
+       return regdb_close();
+}
+
 static WERROR smbconf_reg_open(struct smbconf_ctx *ctx)
 {
        return regdb_open();
@@ -761,6 +766,7 @@ done:
 
 struct smbconf_ops smbconf_ops_reg = {
        .init                   = smbconf_reg_init,
+       .shutdown               = smbconf_reg_shutdown,
        .open_conf              = smbconf_reg_open,
        .close_conf             = smbconf_reg_close,
        .get_csn                = smbconf_reg_get_csn,
index a8dc23fefc1954c538070a4d28007928cba2be7c..b64da6ca73d3661f4e7128693458bb9480c0f175 100644 (file)
@@ -22,6 +22,7 @@
 
 struct smbconf_ops {
        WERROR (*init)(struct smbconf_ctx *ctx);
+       int (*shutdown)(struct smbconf_ctx *ctx);
        WERROR (*open_conf)(struct smbconf_ctx *ctx);
        int (*close_conf)(struct smbconf_ctx *ctx);
        void (*get_csn)(struct smbconf_ctx *ctx, struct smbconf_csn *csn,