From d5170bc64cba573d2a3b504c519f439cf763a48d Mon Sep 17 00:00:00 2001 From: Stephen Gallagher Date: Thu, 10 Sep 2009 09:26:28 -0400 Subject: [PATCH 1/2] Remove unused event context argument from confdb_init Because the confdb always operates synchronously, it maintains its own private event context internally. The event context argument passed to it is never used, so we'll remove it to avoid confusion. --- server/confdb/confdb.c | 1 - server/confdb/confdb.h | 1 - server/monitor/monitor.c | 2 +- server/tests/sysdb-tests.c | 2 +- server/tools/tools_util.c | 2 +- server/util/server.c | 4 ++-- 6 files changed, 5 insertions(+), 7 deletions(-) diff --git a/server/confdb/confdb.c b/server/confdb/confdb.c index 27daee8..5d7bb65 100644 --- a/server/confdb/confdb.c +++ b/server/confdb/confdb.c @@ -627,7 +627,6 @@ done: } int confdb_init(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct confdb_ctx **cdb_ctx, char *confdb_location) { diff --git a/server/confdb/confdb.h b/server/confdb/confdb.h index d325ac8..d49040f 100644 --- a/server/confdb/confdb.h +++ b/server/confdb/confdb.h @@ -86,7 +86,6 @@ int confdb_get_string_as_list(struct confdb_ctx *cdb, TALLOC_CTX *ctx, char ***result); int confdb_init(TALLOC_CTX *mem_ctx, - struct tevent_context *ev, struct confdb_ctx **cdb_ctx, char *confdb_location); diff --git a/server/monitor/monitor.c b/server/monitor/monitor.c index 86b2364..cd4e3ce 100644 --- a/server/monitor/monitor.c +++ b/server/monitor/monitor.c @@ -1811,7 +1811,7 @@ int monitor_process_init(TALLOC_CTX *mem_ctx, } unlink(cdb_file); - ret = confdb_init(ctx, ctx->ev, &ctx->cdb, cdb_file); + ret = confdb_init(ctx, &ctx->cdb, cdb_file); if (ret != EOK) { DEBUG(0,("The confdb initialization failed\n")); talloc_free(ctx); diff --git a/server/tests/sysdb-tests.c b/server/tests/sysdb-tests.c index 38bfcb1..5250b08 100644 --- a/server/tests/sysdb-tests.c +++ b/server/tests/sysdb-tests.c @@ -81,7 +81,7 @@ static int setup_sysdb_tests(struct sysdb_test_ctx **ctx) DEBUG(3, ("CONFDB: %s\n", conf_db)); /* Connect to the conf db */ - ret = confdb_init(test_ctx, test_ctx->ev, &test_ctx->confdb, conf_db); + ret = confdb_init(test_ctx, &test_ctx->confdb, conf_db); if (ret != EOK) { fail("Could not initialize connection to the confdb"); talloc_free(test_ctx); diff --git a/server/tools/tools_util.c b/server/tools/tools_util.c index c23899c..15ba16f 100644 --- a/server/tools/tools_util.c +++ b/server/tools/tools_util.c @@ -76,7 +76,7 @@ int setup_db(struct tools_ctx **tools_ctx) } /* Connect to the conf db */ - ret = confdb_init(ctx, ctx->ev, &ctx->confdb, confdb_path); + ret = confdb_init(ctx, &ctx->confdb, confdb_path); if (ret != EOK) { DEBUG(1, ("Could not initialize connection to the confdb\n")); talloc_free(ctx); diff --git a/server/util/server.c b/server/util/server.c index d20a823..0760e60 100644 --- a/server/util/server.c +++ b/server/util/server.c @@ -47,7 +47,7 @@ static void close_low_fds(bool stderr_too) int i; close(0); - close(1); + close(1); if (stderr_too) close(2); @@ -354,7 +354,7 @@ int server_setup(const char *name, int flags, } DEBUG(3, ("CONFDB: %s\n", conf_db)); - ret = confdb_init(ctx, event_ctx, &ctx->confdb_ctx, conf_db); + ret = confdb_init(ctx, &ctx->confdb_ctx, conf_db); if (ret != EOK) { DEBUG(0,("The confdb initialization failed\n")); return ret; -- 1.6.2.5