summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2010-10-11 17:08:33 +1100
committerAndrew Bartlett <abartlet@samba.org>2010-10-11 13:02:16 +0000
commit69199a96d1a3f134e2c80ef338b5600baabae8f9 (patch)
treecf1d3e1049ee19619e8f5ae59df5d4db704b7bb6
parentbae09a0921ed6b6885972cbaa4f277e5b2ae3dc7 (diff)
downloadsamba-69199a96d1a3f134e2c80ef338b5600baabae8f9.tar.gz
samba-69199a96d1a3f134e2c80ef338b5600baabae8f9.tar.bz2
samba-69199a96d1a3f134e2c80ef338b5600baabae8f9.zip
s4-tevent Remove event_contex_find() and event_context_set_default()
It is considered that it is better to create a new event context rather than 'finding' some other event context, in the case where we do not have one specified. Andrew Bartlett
-rw-r--r--source4/lib/events/tevent_s4.c30
1 files changed, 0 insertions, 30 deletions
diff --git a/source4/lib/events/tevent_s4.c b/source4/lib/events/tevent_s4.c
index ecedf84efb..469ed72ee7 100644
--- a/source4/lib/events/tevent_s4.c
+++ b/source4/lib/events/tevent_s4.c
@@ -71,33 +71,3 @@ struct tevent_context *s4_event_context_init(TALLOC_CTX *mem_ctx)
return ev;
}
-static struct tevent_context *default_tevent_context;
-
-/* set a default event context that will be used for
- * event_context_find() if a parent event context is not found
- */
-void s4_event_context_set_default(struct tevent_context *ev)
-{
- default_tevent_context = ev;
-}
-
-/*
- find an event context that is a parent of the given memory context,
- or create a new event context as a child of the given context if
- none is found
-
- This should be used in preference to event_context_init() in places
- where you would prefer to use the existing event context if possible
- (which is most situations)
-*/
-struct tevent_context *event_context_find(TALLOC_CTX *mem_ctx)
-{
- struct tevent_context *ev = talloc_find_parent_bytype(mem_ctx, struct tevent_context);
- if (ev == NULL) {
- ev = default_tevent_context;
- }
- if (ev == NULL) {
- ev = s4_event_context_init(mem_ctx);
- }
- return ev;
-}