diff options
author | Michael Adam <obnox@samba.org> | 2008-03-21 02:01:55 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-03-21 02:25:56 +0100 |
commit | 6c20e83294f1b288142a2621a393d7c501532d69 (patch) | |
tree | 2ac73cfca725a0df04c4479fea48cac27c9d601d /source3/lib | |
parent | 095048f2dfb7621709f079f171d31bd6c4e610f9 (diff) | |
download | samba-6c20e83294f1b288142a2621a393d7c501532d69.tar.gz samba-6c20e83294f1b288142a2621a393d7c501532d69.tar.bz2 samba-6c20e83294f1b288142a2621a393d7c501532d69.zip |
libsmbconf: add shutdown handler to smbconf_ops.
Michael
(This used to be commit acbd1f40e0cb4cb5b2ba826c4825edda7ee4937b)
Diffstat (limited to 'source3/lib')
-rw-r--r-- | source3/lib/smbconf/smbconf.c | 8 | ||||
-rw-r--r-- | source3/lib/smbconf/smbconf_private.h | 1 |
2 files changed, 8 insertions, 1 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c index 89fe558510..82683caa69 100644 --- a/source3/lib/smbconf/smbconf.c +++ b/source3/lib/smbconf/smbconf.c @@ -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, diff --git a/source3/lib/smbconf/smbconf_private.h b/source3/lib/smbconf/smbconf_private.h index a8dc23fefc..b64da6ca73 100644 --- a/source3/lib/smbconf/smbconf_private.h +++ b/source3/lib/smbconf/smbconf_private.h @@ -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, |