1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-02 00:22:11 +03:00

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.
This commit is contained in:
Andrew Tridgell
2009-10-23 14:27:00 +11:00
parent 05f93c3e8f
commit 4ad0397d8a
20 changed files with 119 additions and 50 deletions

View File

@ -548,7 +548,7 @@ static NTSTATUS add_socket(struct tevent_context *event_context,
/* And once we are bound, free the tempoary ldb, it will
* connect again on each incoming LDAP connection */
talloc_free(ldb);
talloc_unlink(ldap_service, ldb);
return status;
}