diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:27:00 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-23 14:52:17 +1100 |
commit | 4ad0397d8afdd6bec609506f3736f8567afe7564 (patch) | |
tree | c46f3b0f8d5b602ca1cb3b0c32b005d181acdbdc /source4/winbind | |
parent | 05f93c3e8fe2b0f6e520686742c48c78c96605ab (diff) | |
download | samba-4ad0397d8afdd6bec609506f3736f8567afe7564.tar.gz samba-4ad0397d8afdd6bec609506f3736f8567afe7564.tar.xz samba-4ad0397d8afdd6bec609506f3736f8567afe7564.zip |
s4-ldbwrap: added re-use of ldb contexts in ldb_wrap_connect()
This allows us to reuse a ldb context if it is open twice, instead
of going through the expensive process of a full ldb open. We can
reuse it if all of the parameters are the same.
The change relies on callers using talloc_unlink() or free of a parent
to close a ldb context.
Diffstat (limited to 'source4/winbind')
-rw-r--r-- | source4/winbind/idmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source4/winbind/idmap.c b/source4/winbind/idmap.c index 2ef6c93970..153b5c363e 100644 --- a/source4/winbind/idmap.c +++ b/source4/winbind/idmap.c @@ -167,8 +167,8 @@ struct idmap_context *idmap_init(TALLOC_CTX *mem_ctx, idmap_ctx->ldb_ctx = ldb_wrap_connect(mem_ctx, ev_ctx, lp_ctx, lp_idmap_url(lp_ctx), - system_session(mem_ctx, lp_ctx), - NULL, 0, NULL); + system_session(lp_ctx), + NULL, 0); if (idmap_ctx->ldb_ctx == NULL) { return NULL; } |