lib/tevent: In poll_event_context, add a pointer back to the tevent_context
authorMartin Schwenke <martin@meltin.net>
Thu, 7 Jun 2012 02:26:02 +0000 (12:26 +1000)
committerStefan Metzmacher <metze@samba.org>
Fri, 8 Jun 2012 17:00:01 +0000 (19:00 +0200)
This makes it consistent with the other backends.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Signed-off-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/tevent_poll.c

index d2e45c88bea421dddce6be0a7cf5e6c7a00ada9b..2e202aa7ec266fe9bc645a15dd603c9f57676992 100644 (file)
@@ -30,6 +30,9 @@
 #include "tevent_internal.h"
 
 struct poll_event_context {
+       /* a pointer back to the generic event_context */
+       struct tevent_context *ev;
+
        /*
         * These two arrays are maintained together.
         */
@@ -52,6 +55,7 @@ static int poll_event_context_init(struct tevent_context *ev)
        if (poll_ev == NULL) {
                return -1;
        }
+       poll_ev->ev = ev;
        ev->additional_data = poll_ev;
        return 0;
 }