r7778: added talloc_find_parent_bytype() and talloc_find_parent_byname()
commit545203d9154a9ce0f5cc3800796581f62380074b
authorAndrew Tridgell <tridge@samba.org>
Mon, 20 Jun 2005 05:03:54 +0000 (20 05:03 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:18:35 +0000 (10 13:18 -0500)
tree1b086d811be998cd6df593b08ee2bfdbad5940e1
parentdb6933323c0997cc6334d447e9a938cb42731ae9
r7778: added talloc_find_parent_bytype() and talloc_find_parent_byname()

These provide a way to find a parent of a ptr that is of a given
type. I will be using this to find the event context in smbd, relying
on the fact that everything is a child of the top level event
context. I did look at the alternatives, and found that passing the
event context to just about every call in smbd was getting way too
complex (we need to get it to anything that can do a ldb operation, as
that can invoke ldap).

So this method avoids a global, and seems to work nicely
(This used to be commit bdb55c7a10a516b75652065e14f5acd09d24ab35)
source4/lib/talloc/talloc.c
source4/lib/talloc/talloc.h
source4/lib/talloc/talloc_guide.txt