From 6c14b0133dede38294a812be7f5f5bd5ec3d498b Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 23 Jan 2005 12:17:45 +0000 Subject: r4944: every event_add_*() caller was having to call talloc_steal() to take control of the event, so instead build that into the function. If you pass NULL as mem_ctx then it leaves it as a child of the events structure. (This used to be commit 7f981b9ed96f39027cbfd500f41e0c2be64cbb50) --- source4/rpc_server/echo/rpc_echo.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source4/rpc_server') diff --git a/source4/rpc_server/echo/rpc_echo.c b/source4/rpc_server/echo/rpc_echo.c index 2b4f31482d..88fd7fb12d 100644 --- a/source4/rpc_server/echo/rpc_echo.c +++ b/source4/rpc_server/echo/rpc_echo.c @@ -159,11 +159,10 @@ static long echo_TestSleep(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_c te.private = p; te.next_event = timeval_add(&dce_call->time, r->in.seconds, 0); - p->te = event_add_timed(dce_call->event_ctx, &te); + p->te = event_add_timed(dce_call->event_ctx, &te, p); if (!p->te) { return 0; } - talloc_steal(p, p->te); dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC; return 0; -- cgit