summaryrefslogtreecommitdiff
path: root/source4/param
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-04-17 12:23:44 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-04-17 12:23:44 +0200
commit21fc7673780aa1d7c0caab7b17ff9171238913ba (patch)
tree53556069de7ca28e4721473d679c559c71df22b8 /source4/param
parentab07a60d6ed1d9704590747ac69bbaa22bef2df3 (diff)
downloadsamba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.gz
samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.tar.bz2
samba-21fc7673780aa1d7c0caab7b17ff9171238913ba.zip
Specify event_context to ldb_wrap_connect explicitly.
(This used to be commit b4e1ae07a284c044704322446c94351c2decff91)
Diffstat (limited to 'source4/param')
-rw-r--r--source4/param/share.c3
-rw-r--r--source4/param/share.h5
-rw-r--r--source4/param/share_classic.c1
-rw-r--r--source4/param/share_ldb.c6
-rw-r--r--source4/param/tests/share.c4
5 files changed, 13 insertions, 6 deletions
diff --git a/source4/param/share.c b/source4/param/share.c
index 51134d8970..f8ee468054 100644
--- a/source4/param/share.c
+++ b/source4/param/share.c
@@ -127,6 +127,7 @@ NTSTATUS share_register(const struct share_ops *ops)
}
NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name,
+ struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
@@ -138,7 +139,7 @@ NTSTATUS share_get_context_by_name(TALLOC_CTX *mem_ctx, const char *backend_name
return NT_STATUS_INTERNAL_ERROR;
}
- return ops->init(mem_ctx, ops, lp_ctx, ctx);
+ return ops->init(mem_ctx, ops, event_ctx, lp_ctx, ctx);
}
/*
diff --git a/source4/param/share.h b/source4/param/share.h
index 9f9cbdce5b..2a85fd4fbb 100644
--- a/source4/param/share.h
+++ b/source4/param/share.h
@@ -47,9 +47,12 @@ struct share_info {
void *value;
};
+struct event_context;
+
struct share_ops {
const char *name;
- NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct loadparm_context *lp_ctx,
+ NTSTATUS (*init)(TALLOC_CTX *, const struct share_ops*, struct event_context *ev_ctx,
+ struct loadparm_context *lp_ctx,
struct share_context **);
const char *(*string_option)(struct share_config *, const char *, const char *);
int (*int_option)(struct share_config *, const char *, int);
diff --git a/source4/param/share_classic.c b/source4/param/share_classic.c
index c3adc4473c..bac1aac2d7 100644
--- a/source4/param/share_classic.c
+++ b/source4/param/share_classic.c
@@ -25,6 +25,7 @@
static NTSTATUS sclassic_init(TALLOC_CTX *mem_ctx,
const struct share_ops *ops,
+ struct event_context *event_ctx,
struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
diff --git a/source4/param/share_ldb.c b/source4/param/share_ldb.c
index fb40f1e9bf..eba1665cc9 100644
--- a/source4/param/share_ldb.c
+++ b/source4/param/share_ldb.c
@@ -27,7 +27,9 @@
#include "param/share.h"
#include "param/param.h"
-static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, struct loadparm_context *lp_ctx,
+static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops,
+ struct event_context *ev_ctx,
+ struct loadparm_context *lp_ctx,
struct share_context **ctx)
{
struct ldb_context *sdb;
@@ -38,7 +40,7 @@ static NTSTATUS sldb_init(TALLOC_CTX *mem_ctx, const struct share_ops *ops, stru
return NT_STATUS_NO_MEMORY;
}
- sdb = ldb_wrap_connect(*ctx, lp_ctx,
+ sdb = ldb_wrap_connect(*ctx, ev_ctx, lp_ctx,
private_path(*ctx, lp_ctx, "share.ldb"),
system_session(*ctx, lp_ctx),
NULL, 0, NULL);
diff --git a/source4/param/tests/share.c b/source4/param/tests/share.c
index 6d03b4e049..c64b5c607a 100644
--- a/source4/param/tests/share.c
+++ b/source4/param/tests/share.c
@@ -182,12 +182,12 @@ static void tcase_add_share_tests(struct torture_tcase *tcase)
static bool setup_ldb(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", tctx->lp_ctx, (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "ldb", tctx->ev, tctx->lp_ctx, (struct share_context **)data));
}
static bool setup_classic(struct torture_context *tctx, void **data)
{
- return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", tctx->lp_ctx, (struct share_context **)data));
+ return NT_STATUS_IS_OK(share_get_context_by_name(tctx, "classic", tctx->ev, tctx->lp_ctx, (struct share_context **)data));
}
static bool teardown(struct torture_context *tctx, void *data)