From d2d2d6ae0c436461bcc8f881df059eb036314c44 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Mon, 23 Jan 2012 12:57:33 +0100 Subject: Keep sysdb context in domain info struct --- src/tools/tools_util.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'src/tools/tools_util.c') diff --git a/src/tools/tools_util.c b/src/tools/tools_util.c index 00448953..871ba2b1 100644 --- a/src/tools/tools_util.c +++ b/src/tools/tools_util.c @@ -53,14 +53,8 @@ static int setup_db(struct tools_ctx *ctx) return ret; } - ret = confdb_get_domain(ctx->confdb, "local", &ctx->local); - if (ret != EOK) { - DEBUG(1, ("Could not get 'local' domain: [%d] [%s]\n", ret, strerror(ret))); - return ret; - } - - /* open 'local' sysdb at default path */ - ret = sysdb_domain_init(ctx, ctx->local, DB_PATH, &ctx->sysdb); + ret = sysdb_init_domain_and_sysdb(ctx, ctx->confdb, "local", DB_PATH, + &ctx->local, &ctx->sysdb); if (ret != EOK) { DEBUG(1, ("Could not initialize connection to the sysdb\n")); return ret; -- cgit