The branch, master has been updated
       via  e26736d tevent: version 0.9.20
       via  4b330ba tevent: give the user the chance to ask for 
TEVENT_NUM_SIGNALS and TEVENT_SA_INFO_QUEUE_COUNT
       via  cbb93f5 tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256
       via  36345d4 tevent: tevent_epoll_set_panic_fallback() can be a void 
function
       via  4cc02d7 tevent: make use of talloc_get_type_abort() in 
tevent_epoll.c
       via  7bf5e6b tevent: make use of talloc_get_type_abort() in 
tevent_signal.c
       via  fbdaf74 tevent: make use of talloc_get_type_abort() in 
tevent_select.c
       via  99910b6 tevent: make use of talloc_get_type_abort() in tevent_req.c
       via  982bf3c tevent: make use of talloc_get_type_abort() in 
tevent_queue.c
       via  fb06f0e tevent: use talloc_get_type_abort() in the documentation 
examples
       via  8e44c2f tevent: add tevent_queue_wait_send/recv()
       via  7a97d4c tevent: tevent_req_create() already uses ZERO_STRUCT(req)
       via  39888fd tevent: let tevent_req_received() clear the private_cancel 
function
       via  577afba tevent: cancel the timeout timer when the request is 
finished
      from  646d8c2 s3/rpc_server: don't unmarshall PDUs twice

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit e26736dcc25a204bf21a367462d0c10060bee1ad
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Sep 27 04:06:00 2013 +0200

    tevent: version 0.9.20
    
    This adds the following new features:
    
    - tevent_queue_wait_send/recv()
    - tevent_num_signals()
    - tevent_sa_info_queue_count()
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>
    
    Autobuild-User(master): Stefan Metzmacher <[email protected]>
    Autobuild-Date(master): Thu Dec 12 00:39:35 CET 2013 on sn-devel-104

commit 4b330ba0a83e17205c851e83097ec8c1dab02a5c
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 9 10:32:00 2013 +0100

    tevent: give the user the chance to ask for TEVENT_NUM_SIGNALS and 
TEVENT_SA_INFO_QUEUE_COUNT
    
    This way the caller can change use the supported limits without using 
hardcoded
    values.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit cbb93f5442776fbe9810d242f7fe6759adfe3194
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Dec 9 10:29:45 2013 +0100

    tevent: change TEVENT_SA_INFO_QUEUE_COUNT from 64 to 256
    
    There are some existing callers which assume the old
    SA_INFO_QUEUE_COUNT 100 value.
    
    256 should give room for the future.
    
    Bug: https://bugzilla.samba.org/show_bug.cgi?id=10214
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 36345d44c8f5ac614f40a9b5bd4b421ffa6cd49a
Author: Stefan Metzmacher <[email protected]>
Date:   Wed Dec 11 18:58:41 2013 +0100

    tevent: tevent_epoll_set_panic_fallback() can be a void function
    
    There's no case where this could return an error.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 4cc02d7c84e6c6a07ecde02fc6792ed041bdbe3a
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:47:27 2013 +0100

    tevent: make use of talloc_get_type_abort() in tevent_epoll.c
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 7bf5e6b181cc4ea23103ac3fc4f183ba183476b6
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:47:27 2013 +0100

    tevent: make use of talloc_get_type_abort() in tevent_signal.c
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit fbdaf7481b81f021a560e366276c79be6680bce6
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:47:27 2013 +0100

    tevent: make use of talloc_get_type_abort() in tevent_select.c
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 99910b67d267732ac088d9b2b96cd08d367f2cec
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:47:27 2013 +0100

    tevent: make use of talloc_get_type_abort() in tevent_req.c
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 982bf3c082893bbf59a76ed0e7f670d8932102b1
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:47:27 2013 +0100

    tevent: make use of talloc_get_type_abort() in tevent_queue.c
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit fb06f0e3d38a0cd2d6a55e93c993763adb7cf278
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Dec 5 08:46:47 2013 +0100

    tevent: use talloc_get_type_abort() in the documentation examples
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 8e44c2f96397a4f8cf945bcc810e3a1776d86a08
Author: Gregor Beck <[email protected]>
Date:   Thu Sep 19 15:14:25 2013 +0200

    tevent: add tevent_queue_wait_send/recv()
    
    Pair-Programmed-With: Stefan Metzmacher <[email protected]>
    
    Signed-off-by: Gregor Beck <[email protected]>
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 7a97d4c4c36d27e2c0732d70345d1766a4a86e94
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Sep 27 03:02:24 2013 +0200

    tevent: tevent_req_create() already uses ZERO_STRUCT(req)
    
    There's no need to zero individual members.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 39888fd4a3960f3f6a52aad76507faf030888d57
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Sep 27 02:59:22 2013 +0200

    tevent: let tevent_req_received() clear the private_cancel function
    
    This makes sure it's not called when the private state is already gone.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

commit 577afba8b3b75d8ebf8bc496802974b834a53f83
Author: Stefan Metzmacher <[email protected]>
Date:   Sat Sep 17 19:53:55 2011 +0200

    tevent: cancel the timeout timer when the request is finished
    
    As we might defer the callback with tevent_req_defer_callback()
    when calling tevent_req_done(), we should cancel the timeout directly.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Volker Lendecke <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 .../tevent/ABI/tevent-0.9.20.sigs                  |    4 ++
 lib/tevent/doc/tevent_events.dox                   |    4 +-
 lib/tevent/tevent.h                                |   33 +++++++++++
 lib/tevent/tevent_epoll.c                          |   28 ++++------
 lib/tevent/tevent_internal.h                       |    2 +-
 lib/tevent/tevent_queue.c                          |   57 +++++++++++++++++++-
 lib/tevent/tevent_req.c                            |   19 +++++--
 lib/tevent/tevent_select.c                         |   14 +++--
 lib/tevent/tevent_signal.c                         |   24 ++++++---
 lib/tevent/tevent_standard.c                       |    5 +--
 lib/tevent/wscript                                 |    2 +-
 11 files changed, 147 insertions(+), 45 deletions(-)
 copy ctdb/lib/tevent/ABI/tevent-0.9.18.sigs => 
lib/tevent/ABI/tevent-0.9.20.sigs (96%)


Changeset truncated at 500 lines:

diff --git a/ctdb/lib/tevent/ABI/tevent-0.9.18.sigs 
b/lib/tevent/ABI/tevent-0.9.20.sigs
similarity index 96%
copy from ctdb/lib/tevent/ABI/tevent-0.9.18.sigs
copy to lib/tevent/ABI/tevent-0.9.20.sigs
index 70d20b6..7b9c77d 100644
--- a/ctdb/lib/tevent/ABI/tevent-0.9.18.sigs
+++ b/lib/tevent/ABI/tevent-0.9.20.sigs
@@ -43,6 +43,7 @@ tevent_fd_set_flags: void (struct tevent_fd *, uint16_t)
 tevent_get_trace_callback: void (struct tevent_context *, 
tevent_trace_callback_t *, void *)
 tevent_loop_allow_nesting: void (struct tevent_context *)
 tevent_loop_set_nesting_hook: void (struct tevent_context *, 
tevent_nesting_hook, void *)
+tevent_num_signals: size_t (void)
 tevent_queue_add: bool (struct tevent_queue *, struct tevent_context *, struct 
tevent_req *, tevent_queue_trigger_fn_t, void *)
 tevent_queue_add_entry: struct tevent_queue_entry *(struct tevent_queue *, 
struct tevent_context *, struct tevent_req *, tevent_queue_trigger_fn_t, void *)
 tevent_queue_add_optimize_empty: struct tevent_queue_entry *(struct 
tevent_queue *, struct tevent_context *, struct tevent_req *, 
tevent_queue_trigger_fn_t, void *)
@@ -50,6 +51,8 @@ tevent_queue_length: size_t (struct tevent_queue *)
 tevent_queue_running: bool (struct tevent_queue *)
 tevent_queue_start: void (struct tevent_queue *)
 tevent_queue_stop: void (struct tevent_queue *)
+tevent_queue_wait_recv: bool (struct tevent_req *)
+tevent_queue_wait_send: struct tevent_req *(TALLOC_CTX *, struct 
tevent_context *, struct tevent_queue *)
 tevent_re_initialise: int (struct tevent_context *)
 tevent_register_backend: bool (const char *, const struct tevent_ops *)
 tevent_req_default_print: char *(struct tevent_req *, TALLOC_CTX *)
@@ -64,6 +67,7 @@ tevent_req_set_callback: void (struct tevent_req *, 
tevent_req_fn, void *)
 tevent_req_set_cancel_fn: void (struct tevent_req *, tevent_req_cancel_fn)
 tevent_req_set_endtime: bool (struct tevent_req *, struct tevent_context *, 
struct timeval)
 tevent_req_set_print_fn: void (struct tevent_req *, tevent_req_print_fn)
+tevent_sa_info_queue_count: size_t (void)
 tevent_set_abort_fn: void (void (*)(const char *))
 tevent_set_debug: int (struct tevent_context *, void (*)(void *, enum 
tevent_debug_level, const char *, va_list), void *)
 tevent_set_debug_stderr: int (struct tevent_context *)
diff --git a/lib/tevent/doc/tevent_events.dox b/lib/tevent/doc/tevent_events.dox
index 8e350d2..d56af25 100644
--- a/lib/tevent/doc/tevent_events.dox
+++ b/lib/tevent/doc/tevent_events.dox
@@ -45,7 +45,7 @@ struct state {
 static void callback(struct tevent_context *ev, struct tevent_timer *tim,
                      struct timeval current_time, void *private_data)
 {
-    struct state *data = talloc_get_type(private_data, struct state);
+    struct state *data = talloc_get_type_abort(private_data, struct state);
     struct tevent_timer *time_event;
     struct timeval schedule;
 
@@ -153,7 +153,7 @@ struct info_struct {
 static void foo(struct tevent_context *ev, struct tevent_immediate *im,
                 void *private_data)
 {
-    struct info_struct *data = talloc_get_type(private_data, struct 
info_struct);
+    struct info_struct *data = talloc_get_type_abort(private_data, struct 
info_struct);
     printf("Data value: %d\n", data->counter);
 }
 
diff --git a/lib/tevent/tevent.h b/lib/tevent/tevent.h
index 2bc4e2d..0705ff3 100644
--- a/lib/tevent/tevent.h
+++ b/lib/tevent/tevent.h
@@ -1592,6 +1592,39 @@ size_t tevent_queue_length(struct tevent_queue *queue);
  */
 bool tevent_queue_running(struct tevent_queue *queue);
 
+/**
+ * @brief Create a tevent subrequest that waits in a tevent_queue
+ *
+ * The idea is that always the same syntax for tevent requests.
+ *
+ * @param[in]  mem_ctx  The talloc memory context to use.
+ *
+ * @param[in]  ev       The event handle to setup the request.
+ *
+ * @param[in]  queue    The queue to wait in.
+ *
+ * @return              The new subrequest, NULL on error.
+ *
+ * @see tevent_queue_wait_recv()
+ */
+struct tevent_req *tevent_queue_wait_send(TALLOC_CTX *mem_ctx,
+                                         struct tevent_context *ev,
+                                         struct tevent_queue *queue);
+
+/**
+ * @brief Check if we no longer need to wait in the queue.
+ *
+ * This function needs to be called in the callback function set after calling
+ * tevent_queue_wait_send().
+ *
+ * @param[in]  req      The tevent request to check.
+ *
+ * @return              True on success, false otherwise.
+ *
+ * @see tevent_queue_wait_send()
+ */
+bool tevent_queue_wait_recv(struct tevent_req *req);
+
 typedef int (*tevent_nesting_hook)(struct tevent_context *ev,
                                   void *private_data,
                                   uint32_t level,
diff --git a/lib/tevent/tevent_epoll.c b/lib/tevent/tevent_epoll.c
index 599c190..b0d15c8 100644
--- a/lib/tevent/tevent_epoll.c
+++ b/lib/tevent/tevent_epoll.c
@@ -116,21 +116,14 @@ static int epoll_wait_panic_fallback(struct 
epoll_event_context *epoll_ev,
 /*
   called to set the panic fallback function.
 */
-_PRIVATE_ bool tevent_epoll_set_panic_fallback(struct tevent_context *ev,
+_PRIVATE_ void tevent_epoll_set_panic_fallback(struct tevent_context *ev,
                                bool (*panic_fallback)(struct tevent_context 
*ev,
                                                       bool replay))
 {
-       struct epoll_event_context *epoll_ev;
-
-       if (ev->additional_data == NULL) {
-               return false;
-       }
+       struct epoll_event_context *epoll_ev =
+               talloc_get_type_abort(ev->additional_data,
+               struct epoll_event_context);
 
-       epoll_ev = talloc_get_type(ev->additional_data,
-                               struct epoll_event_context);
-       if (epoll_ev == NULL) {
-               return false;
-       }
        epoll_ev->panic_fallback = panic_fallback;
        return true;
 }
@@ -843,8 +836,9 @@ static struct tevent_fd *epoll_event_add_fd(struct 
tevent_context *ev, TALLOC_CT
                                            const char *handler_name,
                                            const char *location)
 {
-       struct epoll_event_context *epoll_ev = 
talloc_get_type(ev->additional_data,
-                                                          struct 
epoll_event_context);
+       struct epoll_event_context *epoll_ev =
+               talloc_get_type_abort(ev->additional_data,
+               struct epoll_event_context);
        struct tevent_fd *fde;
        bool panic_triggered = false;
 
@@ -879,7 +873,8 @@ static void epoll_event_set_fd_flags(struct tevent_fd *fde, 
uint16_t flags)
        if (fde->flags == flags) return;
 
        ev = fde->event_ctx;
-       epoll_ev = talloc_get_type(ev->additional_data, struct 
epoll_event_context);
+       epoll_ev = talloc_get_type_abort(ev->additional_data,
+                                        struct epoll_event_context);
 
        fde->flags = flags;
 
@@ -898,8 +893,9 @@ static void epoll_event_set_fd_flags(struct tevent_fd *fde, 
uint16_t flags)
 */
 static int epoll_event_loop_once(struct tevent_context *ev, const char 
*location)
 {
-       struct epoll_event_context *epoll_ev = 
talloc_get_type(ev->additional_data,
-                                                          struct 
epoll_event_context);
+       struct epoll_event_context *epoll_ev =
+               talloc_get_type_abort(ev->additional_data,
+               struct epoll_event_context);
        struct timeval tval;
        bool panic_triggered = false;
 
diff --git a/lib/tevent/tevent_internal.h b/lib/tevent/tevent_internal.h
index b239e74..df73288 100644
--- a/lib/tevent/tevent_internal.h
+++ b/lib/tevent/tevent_internal.h
@@ -335,7 +335,7 @@ void tevent_poll_event_add_fd_internal(struct 
tevent_context *ev,
 bool tevent_poll_mt_init(void);
 #ifdef HAVE_EPOLL
 bool tevent_epoll_init(void);
-bool tevent_epoll_set_panic_fallback(struct tevent_context *ev,
+void tevent_epoll_set_panic_fallback(struct tevent_context *ev,
                        bool (*panic_fallback)(struct tevent_context *ev,
                                               bool replay));
 #endif
diff --git a/lib/tevent/tevent_queue.c b/lib/tevent/tevent_queue.c
index 4750675..0c5fe4e 100644
--- a/lib/tevent/tevent_queue.c
+++ b/lib/tevent/tevent_queue.c
@@ -133,8 +133,9 @@ static void tevent_queue_immediate_trigger(struct 
tevent_context *ev,
                                           struct tevent_immediate *im,
                                           void *private_data)
 {
-       struct tevent_queue *q = talloc_get_type(private_data,
-                                 struct tevent_queue);
+       struct tevent_queue *q =
+               talloc_get_type_abort(private_data,
+               struct tevent_queue);
 
        if (!q->running) {
                return;
@@ -298,3 +299,55 @@ bool tevent_queue_running(struct tevent_queue *queue)
 {
        return queue->running;
 }
+
+struct tevent_queue_wait_state {
+       uint8_t dummy;
+};
+
+static void tevent_queue_wait_trigger(struct tevent_req *req,
+                                     void *private_data);
+
+struct tevent_req *tevent_queue_wait_send(TALLOC_CTX *mem_ctx,
+                                         struct tevent_context *ev,
+                                         struct tevent_queue *queue)
+{
+       struct tevent_req *req;
+       struct tevent_queue_wait_state *state;
+       bool ok;
+
+       req = tevent_req_create(mem_ctx, &state,
+                               struct tevent_queue_wait_state);
+       if (req == NULL) {
+               return NULL;
+       }
+
+       ok = tevent_queue_add(queue, ev, req,
+                             tevent_queue_wait_trigger,
+                             NULL);
+       if (!ok) {
+               tevent_req_nomem(NULL, req);
+               return tevent_req_post(req, ev);
+       }
+
+       return req;
+}
+
+static void tevent_queue_wait_trigger(struct tevent_req *req,
+                                        void *private_data)
+{
+       tevent_req_done(req);
+}
+
+bool tevent_queue_wait_recv(struct tevent_req *req)
+{
+       enum tevent_req_state state;
+       uint64_t err;
+
+       if (tevent_req_is_error(req, &state, &err)) {
+               tevent_req_received(req);
+               return false;
+       }
+
+       tevent_req_received(req);
+       return true;
+}
diff --git a/lib/tevent/tevent_req.c b/lib/tevent/tevent_req.c
index 556d984..edb8550 100644
--- a/lib/tevent/tevent_req.c
+++ b/lib/tevent/tevent_req.c
@@ -70,14 +70,12 @@ struct tevent_req *_tevent_req_create(TALLOC_CTX *mem_ctx,
        ZERO_STRUCTP(req);
        req->internal.private_type      = type;
        req->internal.create_location   = location;
-       req->internal.finish_location   = NULL;
        req->internal.state             = TEVENT_REQ_IN_PROGRESS;
        req->internal.trigger           = tevent_create_immediate(req);
        if (!req->internal.trigger) {
                talloc_free(req);
                return NULL;
        }
-       req->internal.defer_callback_ev = NULL;
 
        data = talloc_zero_size(req, data_size);
        if (data == NULL) {
@@ -109,6 +107,12 @@ static void tevent_req_finish(struct tevent_req *req,
                              enum tevent_req_state state,
                              const char *location)
 {
+       /*
+        * make sure we do not timeout after
+        * the request was already finished
+        */
+       TALLOC_FREE(req->internal.timer);
+
        req->internal.state = state;
        _tevent_req_notify_callback(req, location);
 }
@@ -163,8 +167,9 @@ static void tevent_req_trigger(struct tevent_context *ev,
                               struct tevent_immediate *im,
                               void *private_data)
 {
-       struct tevent_req *req = talloc_get_type(private_data,
-                                struct tevent_req);
+       struct tevent_req *req =
+               talloc_get_type_abort(private_data,
+               struct tevent_req);
 
        tevent_req_finish(req, req->internal.state,
                          req->internal.finish_location);
@@ -197,6 +202,7 @@ void tevent_req_received(struct tevent_req *req)
 {
        TALLOC_FREE(req->data);
        req->private_print = NULL;
+       req->private_cancel = NULL;
 
        TALLOC_FREE(req->internal.trigger);
        TALLOC_FREE(req->internal.timer);
@@ -237,8 +243,9 @@ static void tevent_req_timedout(struct tevent_context *ev,
                               struct timeval now,
                               void *private_data)
 {
-       struct tevent_req *req = talloc_get_type(private_data,
-                                struct tevent_req);
+       struct tevent_req *req =
+               talloc_get_type_abort(private_data,
+               struct tevent_req);
 
        TALLOC_FREE(req->internal.timer);
 
diff --git a/lib/tevent/tevent_select.c b/lib/tevent/tevent_select.c
index bfce246..73f27b7 100644
--- a/lib/tevent/tevent_select.c
+++ b/lib/tevent/tevent_select.c
@@ -91,8 +91,8 @@ static int select_event_fd_destructor(struct tevent_fd *fde)
        struct select_event_context *select_ev = NULL;
 
        if (ev) {
-               select_ev = talloc_get_type(ev->additional_data,
-                                           struct select_event_context);
+               select_ev = talloc_get_type_abort(ev->additional_data,
+                                                 struct select_event_context);
 
                if (select_ev->maxfd == fde->fd) {
                        select_ev->maxfd = EVENT_INVALID_MAXFD;
@@ -113,8 +113,9 @@ static struct tevent_fd *select_event_add_fd(struct 
tevent_context *ev, TALLOC_C
                                             const char *handler_name,
                                             const char *location)
 {
-       struct select_event_context *select_ev = 
talloc_get_type(ev->additional_data,
-                                                          struct 
select_event_context);
+       struct select_event_context *select_ev =
+               talloc_get_type_abort(ev->additional_data,
+               struct select_event_context);
        struct tevent_fd *fde;
 
        if (fd < 0 || fd >= FD_SETSIZE) {
@@ -236,8 +237,9 @@ static int select_event_loop_select(struct 
select_event_context *select_ev, stru
 */
 static int select_event_loop_once(struct tevent_context *ev, const char 
*location)
 {
-       struct select_event_context *select_ev = 
talloc_get_type(ev->additional_data,
-                                                          struct 
select_event_context);
+       struct select_event_context *select_ev =
+               talloc_get_type_abort(ev->additional_data,
+               struct select_event_context);
        struct timeval tval;
 
        if (ev->signal_events &&
diff --git a/lib/tevent/tevent_signal.c b/lib/tevent/tevent_signal.c
index 8e13d73..1ff4872 100644
--- a/lib/tevent/tevent_signal.c
+++ b/lib/tevent/tevent_signal.c
@@ -35,7 +35,17 @@
   wrap to work correctly. Thanks to Petr Vandrovec <[email protected]>
   for this. */
 
-#define TEVENT_SA_INFO_QUEUE_COUNT 64
+#define TEVENT_SA_INFO_QUEUE_COUNT 256
+
+size_t tevent_num_signals(void)
+{
+       return TEVENT_NUM_SIGNALS;
+}
+
+size_t tevent_sa_info_queue_count(void)
+{
+       return TEVENT_SA_INFO_QUEUE_COUNT;
+}
 
 struct tevent_sigcounter {
        uint32_t count;
@@ -170,9 +180,9 @@ static int tevent_common_signal_list_destructor(struct 
tevent_common_signal_list
 */
 static int tevent_signal_destructor(struct tevent_signal *se)
 {
-       struct tevent_common_signal_list *sl;
-       sl = talloc_get_type(se->additional_data,
-                            struct tevent_common_signal_list);
+       struct tevent_common_signal_list *sl =
+               talloc_get_type_abort(se->additional_data,
+               struct tevent_common_signal_list);
 
        if (se->event_ctx) {
                struct tevent_context *ev = se->event_ctx;
@@ -480,9 +490,9 @@ int tevent_common_check_signal(struct tevent_context *ev)
 
 void tevent_cleanup_pending_signal_handlers(struct tevent_signal *se)
 {
-       struct tevent_common_signal_list *sl;
-       sl = talloc_get_type(se->additional_data,
-                            struct tevent_common_signal_list);
+       struct tevent_common_signal_list *sl =
+               talloc_get_type_abort(se->additional_data,
+               struct tevent_common_signal_list);
 
        tevent_common_signal_list_destructor(sl);
 
diff --git a/lib/tevent/tevent_standard.c b/lib/tevent/tevent_standard.c
index 2584994..785d68d 100644
--- a/lib/tevent/tevent_standard.c
+++ b/lib/tevent/tevent_standard.c
@@ -206,10 +206,7 @@ static int std_event_context_init(struct tevent_context 
*ev)
                        goto fallback;
                }
 #ifdef HAVE_EPOLL
-               if (!tevent_epoll_set_panic_fallback(ev, std_fallback_to_poll)) 
{
-                       TALLOC_FREE(ev->additional_data);
-                       goto fallback;
-               }
+               tevent_epoll_set_panic_fallback(ev, std_fallback_to_poll);
 #endif
 
                return ret;
diff --git a/lib/tevent/wscript b/lib/tevent/wscript
index 39f2ae4..3fc87f5 100755
--- a/lib/tevent/wscript
+++ b/lib/tevent/wscript
@@ -1,7 +1,7 @@
 #!/usr/bin/env python
 
 APPNAME = 'tevent'
-VERSION = '0.9.19'
+VERSION = '0.9.20'
 
 blddir = 'bin'
 


-- 
Samba Shared Repository

Reply via email to