r4945: the te element isn't needed any more
authorAndrew Tridgell <tridge@samba.org>
Sun, 23 Jan 2005 12:24:36 +0000 (12:24 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:08 +0000 (13:09 -0500)
In general, now that events are children of the structure they are
handling events for, the caller only needs to keep the event handle
around if it plans on changing the event flags later
(This used to be commit 8c8955155476827408c107af38089c8320631526)

source4/rpc_server/echo/rpc_echo.c

index 88fd7fb12db47a829ae34ad57303b6485f076108..b793cd4da710a908a469bc45f2658aea785a7765 100644 (file)
@@ -117,7 +117,6 @@ static NTSTATUS echo_TestEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *me
 struct echo_TestSleep_private {
        struct dcesrv_call_state *dce_call;
        struct echo_TestSleep *r;
-       struct timed_event *te;
 };
 
 static void echo_TestSleep_handler(struct event_context *ev, struct timed_event *te, struct timeval t)
@@ -159,10 +158,7 @@ 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);
-       if (!p->te) {
-               return 0;
-       }
+       event_add_timed(dce_call->event_ctx, &te, p);
 
        dce_call->state_flags |= DCESRV_CALL_STATE_FLAG_ASYNC;
        return 0;