summaryrefslogtreecommitdiff
path: root/source3/lib/smbconf/smbconf.c
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2008-03-20 18:40:09 +0100
committerMichael Adam <obnox@samba.org>2008-03-21 02:25:56 +0100
commitac7c582ec0a357c5b0e53bf38dd09a34eaab64eb (patch)
treed7116791542cf4ee80a553bb0a182e2eb45c9c01 /source3/lib/smbconf/smbconf.c
parent2135f7dd61ea46b539fefc9af3d0212a9281edcd (diff)
downloadsamba-ac7c582ec0a357c5b0e53bf38dd09a34eaab64eb.tar.gz
samba-ac7c582ec0a357c5b0e53bf38dd09a34eaab64eb.tar.bz2
samba-ac7c582ec0a357c5b0e53bf38dd09a34eaab64eb.zip
libsmbconf: add open and close operations to the smbconf_ops.
Note: currently, reg_init_smbconf opens the registry, but does not close it. This has to be changed. so that it is closed. And then libsmbconf will need these open/close functions Michael (This used to be commit 77dbdf82efa60c8a7c00e489c198775b2f66e56c)
Diffstat (limited to 'source3/lib/smbconf/smbconf.c')
-rw-r--r--source3/lib/smbconf/smbconf.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/source3/lib/smbconf/smbconf.c b/source3/lib/smbconf/smbconf.c
index a9e895a168..4a5cbbd489 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 regdb_close();
+ return ctx->ops->close_conf(ctx);
}
static WERROR smbconf_global_check(struct smbconf_ctx *ctx)
@@ -436,6 +436,16 @@ done:
return werr;
}
+static WERROR smbconf_reg_open(struct smbconf_ctx *ctx)
+{
+ return regdb_open();
+}
+
+static int smbconf_reg_close(struct smbconf_ctx *ctx)
+{
+ return regdb_close();
+}
+
/**
* Get the change sequence number of the given service/parameter.
* service and parameter strings may be NULL.
@@ -751,6 +761,8 @@ done:
struct smbconf_ops smbconf_ops_reg = {
.init = smbconf_reg_init,
+ .open_conf = smbconf_reg_open,
+ .close_conf = smbconf_reg_close,
.get_csn = smbconf_reg_get_csn,
.drop = smbconf_reg_drop,
.get_share_names = smbconf_reg_get_share_names,