The branch, master has been updated
       via  e186d6a s4:messaging: make sure only imessaging_client_init() can 
be used with a wrapper tevent_context wrapper
       via  a08ab29 s4:messaging: allow imessaging_post_handler() to free the 
messaging context from a handler
       via  2b05f10 s3:messages: allow messaging_filtered_read_send() to use 
wrapper tevent_context
       via  9dc3320 s3:messages: allow messaging_dgm_ref() to use wrapper 
tevent_context
       via  660cf86 s3:messages: allow 
messaging_{dgm,ctdb}_register_tevent_context() to use wrapper tevent_context
       via  7f2afc2 s3:messages: protect against usage of wrapper 
tevent_context objects for messaging
       via  bb68353 winbindd: Do request profiling
       via  5af9ecf6 winbindd: Convert process_request() to tevent_req
       via  86a548c torture: Test tevent_req_profile
       via  1e20655 lib: Add tevent_req_profile helpers
       via  9847848 lib: Multi-line a long line in wscript_build
       via  f4fe3f7 tevent: version 0.9.37
       via  3dae506 tevent: Add tevent_req_profile
       via  6189446 tevent: add a test that frees wrapper_ev with pending events
       via  4991c93 tevent: add a simple wrapper test
       via  ac9569b tevent: add tevent_context_wrapper_create() infrastructure
       via  e239cbc tevent: make use of #include "system/threads.h"
       via  072e3b2 tevent: split out tevent_common_invoke_fd_handler()
       via  6740718 tevent: split out tevent_common_invoke_immediate_handler()
       via  a85ee85 tevent: split out tevent_common_invoke_timer_handler()
       via  ddab219 tevent: split out tevent_common_invoke_signal_handler()
       via  d1b347c tevent: simplify tevent_signal_destructor()
       via  601fd81 tevent: use talloc_zero() in tevent_signal.c
       via  8a94793 tevent: simplify tevent_cleanup_pending_signal_handlers()
       via  58fa08c tevent: add tevent_common_check_double_free() helper 
function
       via  157df4d tevent: add tevent_threaded_schedule_immediate_destructor 
that just aborts
       via  0b91f6f tevent: use _tevent_schedule_immediate() to move events 
from a thread to the main_ev
       via  788187c tevent: use struct initializers for tevent_immediate
       via  1c9a7a7 tevent: use struct initializers for tevent_signal
       via  b983aca tevent: use struct initializers for tevent_timer
       via  049a06e tevent: use struct initializers for tevent_fd
       via  add485e tevent: make tevent_abort() available for backends
       via  f8578e0 tevent: allow tevent_abort() to cope with ev == NULL
       via  1eccb2d tevent/testsuite: return after torture_fail()
       via  cd51751 tevent.h: improve tevent_req documentation
       via  f69bca6 tevent: rewrite/simplify tevent_poll and maintain 
ev->fd_events correctly
       via  2cbed65 tevent: make use of tevent_common_wakeup() in the poll and 
poll_mt backends
      from  8fe2fdc winbindd: Remove ads.h include from nss_info

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


- Log -----------------------------------------------------------------
commit e186d6a06b1b300256a2cb4138f0532d518d0597
Author: Stefan Metzmacher <[email protected]>
Date:   Fri May 18 16:28:47 2018 +0200

    s4:messaging: make sure only imessaging_client_init() can be used with a 
wrapper tevent_context wrapper
    
    imessaging_client_init() can be used with a wrapper tevent_context,
    but only if a global messaging_dgm_ref() already exist.
    
    All other uses of imessaging_init() and imessaging_client_init()
    require a raw tevent_context.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>
    
    Autobuild-User(master): Ralph Böhme <[email protected]>
    Autobuild-Date(master): Thu Jul 12 02:23:37 CEST 2018 on sn-devel-144

commit a08ab2940051ae47ce71149087a24d060227ef19
Author: Stefan Metzmacher <[email protected]>
Date:   Sat May 19 10:14:25 2018 +0200

    s4:messaging: allow imessaging_post_handler() to free the messaging context 
from a handler
    
    In usecases like using messaging_client_init() with irpc processing we may
    free the imessaging_context during the messaging handler.
    imessaging_post_handler() is not yet really used, but it will change in
    the next commits. imessaging_post_state is a child of imessaging_context
    and might be implicitly free'ed before the explicit TALLOC_FREE(state).
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 2b05f1098187e00166649c8ea7c63e6901b9d242
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Mar 23 14:48:46 2018 +0100

    s3:messages: allow messaging_filtered_read_send() to use wrapper 
tevent_context
    
    As it gets 'messaging_context' as argument, we're sure a messaging context
    with a raw tevent context already exist.
    
    It means we can allow a wrapper tevent context that wrapps the main tevent
    context of the messaging context.
    
    The use of tevent_req_defer_callback() makes sure that the callers
    callback function calls messaging_filtered_read_recv() from the
    correct "wrapped" environment.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 9dc332060cf5f249ea887dbc60ec7a39b6f91120
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Mar 23 14:48:46 2018 +0100

    s3:messages: allow messaging_dgm_ref() to use wrapper tevent_context
    
    This is only allowed if the raw tevent context is already registered.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 660cf86639753edaa7a7a21a5b5ae207ae7d4260
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Mar 23 14:48:46 2018 +0100

    s3:messages: allow messaging_{dgm,ctdb}_register_tevent_context() to use 
wrapper tevent_context
    
    This is only allowed if the raw tevent context is already registered.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 7f2afc20e1b6397c364a98d1be006377c95e4665
Author: Stefan Metzmacher <[email protected]>
Date:   Fri May 18 16:28:47 2018 +0200

    s3:messages: protect against usage of wrapper tevent_context objects for 
messaging
    
    This makes a lot of assumtion easier to understand and the introduction
    of wrapper tevent contexts will not change the existing behaviour.
    
    We'll relax this a bit in the next commits.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit bb683535f1e97b2f5a401575e38c78ad917a286c
Author: Volker Lendecke <[email protected]>
Date:   Tue Jun 19 11:13:19 2018 +0200

    winbindd: Do request profiling
    
    By default we log a request that takes more than 60 seconds. This can be
    changed by setting
    
    winbind:request profile threshold = <seconds>
    
    Another parameter controls the depth of the request hierarchy printed:
    
    winbind:request profile depth = <n>
    
    The default request logged to syslog via DEBUG(0) looks like the
    following for a wbinfo -P:
    
    [struct process_request_state] ../source3/winbindd/winbindd.c:683 
[2018/06/19 13:33:14.190365] ../source3/winbindd/winbindd.c:853 [2018/06/19 
13:33:14.192737] [0.002372] -> TEVENT_REQ_DONE (2 0))
     [struct winbindd_ping_dc_state] ../source3/winbindd/winbindd_ping_dc.c:41 
[2018/06/19 13:33:14.190369] ../source3/winbindd/winbindd_ping_dc.c:112 
[2018/06/19 13:33:14.192681] [0.002312] -> TEVENT_REQ_DONE (2 0))
      [struct dcerpc_wbint_PingDc_state] 
default/librpc/gen_ndr/ndr_winbind_c.c:4335 [2018/06/19 13:33:14.190383] 
default/librpc/gen_ndr/ndr_winbind_c.c:4396 [2018/06/19 13:33:14.192680] 
[0.002297] -> TEVENT_REQ_DONE (2 0))
       [struct dcerpc_wbint_PingDc_r_state] 
default/librpc/gen_ndr/ndr_winbind_c.c:4251 [2018/06/19 13:33:14.190385] 
default/librpc/gen_ndr/ndr_winbind_c.c:4285 [2018/06/19 13:33:14.192678] 
[0.002293] -> TEVENT_REQ_DONE (2 0))
        [struct dcerpc_binding_handle_call_state] 
../librpc/rpc/binding_handle.c:371 [2018/06/19 13:33:14.190387] 
../librpc/rpc/binding_handle.c:520 [2018/06/19 13:33:14.192675] [0.002288] -> 
TEVENT_REQ_DONE (2 0))
         [struct dcerpc_binding_handle_raw_call_state] 
../librpc/rpc/binding_handle.c:149 [2018/06/19 13:33:14.190400] 
../librpc/rpc/binding_handle.c:203 [2018/06/19 13:33:14.192646] [0.002246] -> 
TEVENT_REQ_DONE (2 0))
          [struct wbint_bh_raw_call_state] 
../source3/winbindd/winbindd_dual_ndr.c:89 [2018/06/19 13:33:14.190402] 
../source3/winbindd/winbindd_dual_ndr.c:204 [2018/06/19 13:33:14.192644] 
[0.002242] -> TEVENT_REQ_DONE (2 0))
           [struct wb_domain_request_state] 
../source3/winbindd/winbindd_dual.c:473 [2018/06/19 13:33:14.190404] 
../source3/winbindd/winbindd_dual.c:708 [2018/06/19 13:33:14.192640] [0.002236] 
-> TEVENT_REQ_DONE (2 0))
            [struct wb_child_request_state] 
../source3/winbindd/winbindd_dual.c:198 [2018/06/19 13:33:14.190411] 
../source3/winbindd/winbindd_dual.c:273 [2018/06/19 13:33:14.192638] [0.002227] 
-> TEVENT_REQ_DONE (2 0))
             [struct tevent_queue_wait_state] ../lib/tevent/tevent_queue.c:336 
[2018/06/19 13:33:14.190412] ../lib/tevent/tevent_queue.c:355 [2018/06/19 
13:33:14.190415] [0.000003] -> TEVENT_REQ_DONE (2 0))
             [struct wb_simple_trans_state] ../nsswitch/wb_reqtrans.c:375 
[2018/06/19 13:33:14.190424] ../nsswitch/wb_reqtrans.c:432 [2018/06/19 
13:33:14.192630] [0.002206] -> TEVENT_REQ_DONE (2 0))
              [struct req_write_state] ../nsswitch/wb_reqtrans.c:158 
[2018/06/19 13:33:14.190425] ../nsswitch/wb_reqtrans.c:194 [2018/06/19 
13:33:14.190472] [0.000047] -> TEVENT_REQ_DONE (2 0))
               [struct writev_state] ../lib/async_req/async_sock.c:263 
[2018/06/19 13:33:14.190432] ../lib/async_req/async_sock.c:412 [2018/06/19 
13:33:14.190470] [0.000038] -> TEVENT_REQ_DONE (2 0))
              [struct resp_read_state] ../nsswitch/wb_reqtrans.c:222 
[2018/06/19 13:33:14.190475] ../nsswitch/wb_reqtrans.c:275 [2018/06/19 
13:33:14.192629] [0.002154] -> TEVENT_REQ_DONE (2 0))
               [struct read_packet_state] ../lib/async_req/async_sock.c:458 
[2018/06/19 13:33:14.190476] ../lib/async_req/async_sock.c:546 [2018/06/19 
13:33:14.192626] [0.002150] -> TEVENT_REQ_DONE (2 0))
     [struct resp_write_state] ../nsswitch/wb_reqtrans.c:307 [2018/06/19 
13:33:14.192693] ../nsswitch/wb_reqtrans.c:344 [2018/06/19 13:33:14.192734] 
[0.000041] -> TEVENT_REQ_DONE (2 0))
      [struct writev_state] ../lib/async_req/async_sock.c:263 [2018/06/19 
13:33:14.192694] ../lib/async_req/async_sock.c:412 [2018/06/19 13:33:14.192732] 
[0.000038] -> TEVENT_REQ_DONE (2 0))
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 5af9ecf6f021552f38021b138850bc4020693270
Author: Volker Lendecke <[email protected]>
Date:   Thu May 3 15:12:55 2018 +0200

    winbindd: Convert process_request() to tevent_req
    
    Having a central tevent_req per winbind child request is prerequisite
    for request profiling
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 86a548c693852300eed4e53b83ed2fe76b4a5d08
Author: Volker Lendecke <[email protected]>
Date:   Wed May 2 14:02:18 2018 +0200

    torture: Test tevent_req_profile
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit 1e206553eba04abc6906bfb67b7c4132144473f8
Author: Volker Lendecke <[email protected]>
Date:   Wed May 2 13:59:57 2018 +0200

    lib: Add tevent_req_profile helpers
    
    Print and marshall/unmarshall tevent_req_profile structs
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit 9847848cca1fc0ca2091764b6e80631c4f1f6864
Author: Volker Lendecke <[email protected]>
Date:   Wed May 2 13:54:42 2018 +0200

    lib: Multi-line a long line in wscript_build
    
    Why? I'll add another file in a later commit
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit f4fe3f77669875070cd7ba4a28ad33f6a058f105
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Aug 14 21:51:09 2014 +0200

    tevent: version 0.9.37
    
    * simplify "poll" and "poll_mt" backends
    * make tevent_abort() reachable for backends
    * add tevent_common_invoke_*_handler() functions
    * add tevent_context_same_loop() function
    * add tevent_context_wrapper_create() infrastructure
    * add tevent_req_profile infrastructure
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 3dae5061b593c3ee1f80481a40fa2d556440c117
Author: Volker Lendecke <[email protected]>
Date:   Wed May 2 14:01:56 2018 +0200

    tevent: Add tevent_req_profile
    
    This allows detailed reporting where a tevent_req spends its time
    
    Signed-off-by: Volker Lendecke <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit 6189446abe27acda82afb6d9eb43b0b01c5ce4bc
Author: Ralph Boehme <[email protected]>
Date:   Sat Jun 16 16:55:44 2018 +0200

    tevent: add a test that frees wrapper_ev with pending events
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit 4991c935c03236f60183d37b4a24c68713ee4962
Author: Ralph Boehme <[email protected]>
Date:   Sat Jun 16 14:12:01 2018 +0200

    tevent: add a simple wrapper test
    
    This checks that for all supported event types the before and after
    handlers are called.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit ac9569b1a61319166e497d51917db7f04a2746ce
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 16:51:38 2014 +0200

    tevent: add tevent_context_wrapper_create() infrastructure
    
    This allows to specify wrapper tevent_contexts, which adds the ability
    to run functions before and after the event handler functions.
    
    This can be used to implement impersonation hooks
    or advanced debugging/profiling hooks.
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit e239cbc1fd7ad3008ecb423f7dcb82651d2df420
Author: Stefan Metzmacher <[email protected]>
Date:   Tue May 22 15:43:12 2018 +0200

    tevent: make use of #include "system/threads.h"
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 072e3b28ce029dd103ef2ea9836b6c6254825a8e
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 14:45:33 2014 +0200

    tevent: split out tevent_common_invoke_fd_handler()
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 6740718e0e7db82563870ff398de90dac8f09228
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 13:08:42 2014 +0200

    tevent: split out tevent_common_invoke_immediate_handler()
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit a85ee852accd9137dbffa1e41df8618123b00450
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 13:08:42 2014 +0200

    tevent: split out tevent_common_invoke_timer_handler()
    
    As side effect this avoids tricks with an extra
    tevent_common_timed_deny_destructor().
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit ddab21987d3edb17333a5759bd7bcbb7b5126b53
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 13:01:01 2014 +0200

    tevent: split out tevent_common_invoke_signal_handler()
    
    As side effect this avoids tricks with tevent_se_exists_destructor() to
    figure out if the event handler removed itself.
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit d1b347c4ca6fc0640952f1d639c2a321d6feff53
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Apr 17 16:43:54 2018 +0200

    tevent: simplify tevent_signal_destructor()
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 601fd81ef274ee42121d71d2167a62fdcb759409
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Mar 27 14:30:20 2018 +0200

    tevent: use talloc_zero() in tevent_signal.c
    
    This might not be strictly required, but it might
    avoid problems in future...
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 8a947939e11cacde7c4b4dce03bf12348642ee7f
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 12:02:45 2014 +0200

    tevent: simplify tevent_cleanup_pending_signal_handlers()
    
    Calling tevent_signal_destructor() does the same as se->event_ctx is already
    NULL.
    
    This also makes sure we correctly cleanup the SA_SIGINFO array.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 58fa08c80562490bd774f4dc774dc1ce3a042f3c
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Apr 17 16:33:47 2018 +0200

    tevent: add tevent_common_check_double_free() helper function
    
    This will be used to generically support TALLOC_FREE() on
    event which are currently running.
    
    It aborts on every explicit talloc_free(), but ignores implicit
    cleanup when the talloc parent is about to go.
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 157df4da26aeb46eedf1a0f3895cc5fbc751f1dc
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Mar 23 10:32:15 2018 +0100

    tevent: add tevent_threaded_schedule_immediate_destructor that just aborts
    
    This will be active while the event is part of the ev->scheduled_immediates
    list.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 0b91f6f0e4eeff7bbff24b33dd2087e2903e969b
Author: Stefan Metzmacher <[email protected]>
Date:   Fri Mar 23 10:25:27 2018 +0100

    tevent: use _tevent_schedule_immediate() to move events from a thread to 
the main_ev
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 788187c0309bf3bfcc7e056a3d78c2f4c2df7588
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Oct 23 07:15:14 2014 +0200

    tevent: use struct initializers for tevent_immediate
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 1c9a7a77591a5d742e81ba17875480e6fcb2b476
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Oct 23 07:15:14 2014 +0200

    tevent: use struct initializers for tevent_signal
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit b983aca86d368c5e86f081315f28a42482b8e47d
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Oct 23 07:15:14 2014 +0200

    tevent: use struct initializers for tevent_timer
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 049a06e621adf01b0762217031c509aa7a4ec863
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Oct 23 07:15:14 2014 +0200

    tevent: use struct initializers for tevent_fd
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit add485e47cf4c082eb117d64fd7a7a397484a66a
Author: Stefan Metzmacher <[email protected]>
Date:   Tue Jul 22 15:10:00 2014 +0200

    tevent: make tevent_abort() available for backends
    
    We'll undo the 0.9.36 ABI change on the 0.9.37 release
    at the end of this patchset.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit f8578e012c17b1513f09de97a12d1126e77aac79
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Mar 22 16:51:01 2018 +0100

    tevent: allow tevent_abort() to cope with ev == NULL
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 1eccb2dd1c24073bb7353c1ec9280347d6259331
Author: Stefan Metzmacher <[email protected]>
Date:   Thu Oct 23 06:54:10 2014 +0200

    tevent/testsuite: return after torture_fail()
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit cd517516b79f97d6f31c368e61565326a5c70af7
Author: Ralph Boehme <[email protected]>
Date:   Wed Sep 23 04:27:53 2015 +0200

    tevent.h: improve tevent_req documentation
    
    Document tevent_req naming conventions.
    
    Signed-off-by: Ralph Boehme <[email protected]>
    Reviewed-by: Stefan Metzmacher <[email protected]>

commit f69bca61d582a62de3a9718983362f53992e4c27
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Jun 18 19:49:52 2018 +0200

    tevent: rewrite/simplify tevent_poll and maintain ev->fd_events correctly
    
    The following patches will rely on having all valid fd events in
    ev->fd_events, even if they are temporary disabled with
    tevent_set_fd_flags(fde, 0);
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

commit 2cbed651d421ca47f3c86dc75adcaea10519c128
Author: Stefan Metzmacher <[email protected]>
Date:   Mon Jun 18 17:59:40 2018 +0200

    tevent: make use of tevent_common_wakeup() in the poll and poll_mt backends
    
    This simplifies the "poll_mt" logic a lot.
    
    Signed-off-by: Stefan Metzmacher <[email protected]>
    Reviewed-by: Ralph Boehme <[email protected]>

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

Summary of changes:
 .../ABI/{tevent-0.9.36.sigs => tevent-0.9.37.sigs} |  26 +
 lib/tevent/test_req.c                              | 277 ++++++++++
 lib/tevent/testsuite.c                             | 518 ++++++++++++++++++-
 lib/tevent/tevent.c                                |  59 ++-
 lib/tevent/tevent.h                                | 467 ++++++++++++++++-
 lib/tevent/tevent_debug.c                          |  16 +
 lib/tevent/tevent_epoll.c                          |  11 +-
 lib/tevent/tevent_fd.c                             |  85 ++-
 lib/tevent/tevent_immediate.c                      | 152 ++++--
 lib/tevent/tevent_internal.h                       |  78 ++-
 lib/tevent/tevent_poll.c                           | 401 ++++++---------
 lib/tevent/tevent_port.c                           |   3 +-
 lib/tevent/tevent_req.c                            | 203 ++++++++
 lib/tevent/tevent_signal.c                         | 189 ++++---
 lib/tevent/tevent_standard.c                       |  16 +-
 lib/tevent/tevent_threads.c                        |  96 +++-
 lib/tevent/tevent_timed.c                          | 155 ++++--
 lib/tevent/tevent_wrapper.c                        | 568 +++++++++++++++++++++
 lib/tevent/wscript                                 |   4 +-
 lib/util/tevent_req_profile.c                      | 519 +++++++++++++++++++
 lib/{replace/cwrap.c => util/tevent_req_profile.h} |  46 +-
 lib/util/wscript_build                             |   7 +-
 source3/lib/messages.c                             |  37 +-
 source3/lib/messages_ctdb.c                        |  30 +-
 source3/lib/messages_ctdb_ref.c                    |  12 +
 source3/lib/messages_dgm.c                         |  36 +-
 source3/lib/messages_dgm_ref.c                     |  12 +
 source3/winbindd/winbindd.c                        | 370 ++++++++------
 source4/lib/messaging/messaging.c                  |  61 ++-
 source4/torture/local/local.c                      |   1 +
 source4/torture/local/wscript_build                |   1 +
 31 files changed, 3824 insertions(+), 632 deletions(-)
 copy lib/tevent/ABI/{tevent-0.9.36.sigs => tevent-0.9.37.sigs} (77%)
 create mode 100644 lib/tevent/test_req.c
 create mode 100644 lib/tevent/tevent_wrapper.c
 create mode 100644 lib/util/tevent_req_profile.c
 copy lib/{replace/cwrap.c => util/tevent_req_profile.h} (51%)


Changeset truncated at 500 lines:

diff --git a/lib/tevent/ABI/tevent-0.9.36.sigs 
b/lib/tevent/ABI/tevent-0.9.37.sigs
similarity index 77%
copy from lib/tevent/ABI/tevent-0.9.36.sigs
copy to lib/tevent/ABI/tevent-0.9.37.sigs
index 8a579c8..f6227db 100644
--- a/lib/tevent/ABI/tevent-0.9.36.sigs
+++ b/lib/tevent/ABI/tevent-0.9.37.sigs
@@ -1,6 +1,9 @@
 _tevent_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX *, int, 
uint16_t, tevent_fd_handler_t, void *, const char *, const char *)
 _tevent_add_signal: struct tevent_signal *(struct tevent_context *, TALLOC_CTX 
*, int, int, tevent_signal_handler_t, void *, const char *, const char *)
 _tevent_add_timer: struct tevent_timer *(struct tevent_context *, TALLOC_CTX 
*, struct timeval, tevent_timer_handler_t, void *, const char *, const char *)
+_tevent_context_pop_use: void (struct tevent_context *, const char *)
+_tevent_context_push_use: bool (struct tevent_context *, const char *)
+_tevent_context_wrapper_create: struct tevent_context *(struct tevent_context 
*, TALLOC_CTX *, const struct tevent_wrapper_ops *, void *, size_t, const char 
*, const char *)
 _tevent_create_immediate: struct tevent_immediate *(TALLOC_CTX *, const char *)
 _tevent_loop_once: int (struct tevent_context *, const char *)
 _tevent_loop_until: int (struct tevent_context *, bool (*)(void *), void *, 
const char *)
@@ -17,12 +20,14 @@ _tevent_req_notify_callback: void (struct tevent_req *, 
const char *)
 _tevent_req_oom: void (struct tevent_req *, const char *)
 _tevent_schedule_immediate: void (struct tevent_immediate *, struct 
tevent_context *, tevent_immediate_handler_t, void *, const char *, const char 
*)
 _tevent_threaded_schedule_immediate: void (struct tevent_threaded_context *, 
struct tevent_immediate *, tevent_immediate_handler_t, void *, const char *, 
const char *)
+tevent_abort: void (struct tevent_context *, const char *)
 tevent_backend_list: const char **(TALLOC_CTX *)
 tevent_cleanup_pending_signal_handlers: void (struct tevent_signal *)
 tevent_common_add_fd: struct tevent_fd *(struct tevent_context *, TALLOC_CTX 
*, int, uint16_t, tevent_fd_handler_t, void *, const char *, const char *)
 tevent_common_add_signal: struct tevent_signal *(struct tevent_context *, 
TALLOC_CTX *, int, int, tevent_signal_handler_t, void *, const char *, const 
char *)
 tevent_common_add_timer: struct tevent_timer *(struct tevent_context *, 
TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, 
const char *)
 tevent_common_add_timer_v2: struct tevent_timer *(struct tevent_context *, 
TALLOC_CTX *, struct timeval, tevent_timer_handler_t, void *, const char *, 
const char *)
+tevent_common_check_double_free: void (TALLOC_CTX *, const char *)
 tevent_common_check_signal: int (struct tevent_context *)
 tevent_common_context_destructor: int (struct tevent_context *)
 tevent_common_fd_destructor: int (struct tevent_fd *)
@@ -30,6 +35,10 @@ tevent_common_fd_get_flags: uint16_t (struct tevent_fd *)
 tevent_common_fd_set_close_fn: void (struct tevent_fd *, tevent_fd_close_fn_t)
 tevent_common_fd_set_flags: void (struct tevent_fd *, uint16_t)
 tevent_common_have_events: bool (struct tevent_context *)
+tevent_common_invoke_fd_handler: int (struct tevent_fd *, uint16_t, bool *)
+tevent_common_invoke_immediate_handler: int (struct tevent_immediate *, bool *)
+tevent_common_invoke_signal_handler: int (struct tevent_signal *, int, int, 
void *, bool *)
+tevent_common_invoke_timer_handler: int (struct tevent_timer *, struct 
timeval, bool *)
 tevent_common_loop_immediate: bool (struct tevent_context *)
 tevent_common_loop_timer_delay: struct timeval (struct tevent_context *)
 tevent_common_loop_wait: int (struct tevent_context *, const char *)
@@ -41,6 +50,8 @@ tevent_common_wakeup_init: int (struct tevent_context *)
 tevent_context_init: struct tevent_context *(TALLOC_CTX *)
 tevent_context_init_byname: struct tevent_context *(TALLOC_CTX *, const char *)
 tevent_context_init_ops: struct tevent_context *(TALLOC_CTX *, const struct 
tevent_ops *, void *)
+tevent_context_is_wrapper: bool (struct tevent_context *)
+tevent_context_same_loop: bool (struct tevent_context *, struct tevent_context 
*)
 tevent_debug: void (struct tevent_context *, enum tevent_debug_level, const 
char *, ...)
 tevent_fd_get_flags: uint16_t (struct tevent_fd *)
 tevent_fd_set_auto_close: void (struct tevent_fd *)
@@ -64,11 +75,25 @@ 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 *)
 tevent_req_defer_callback: void (struct tevent_req *, struct tevent_context *)
+tevent_req_get_profile: const struct tevent_req_profile *(struct tevent_req *)
 tevent_req_is_error: bool (struct tevent_req *, enum tevent_req_state *, 
uint64_t *)
 tevent_req_is_in_progress: bool (struct tevent_req *)
+tevent_req_move_profile: struct tevent_req_profile *(struct tevent_req *, 
TALLOC_CTX *)
 tevent_req_poll: bool (struct tevent_req *, struct tevent_context *)
 tevent_req_post: struct tevent_req *(struct tevent_req *, struct 
tevent_context *)
 tevent_req_print: char *(TALLOC_CTX *, struct tevent_req *)
+tevent_req_profile_append_sub: void (struct tevent_req_profile *, struct 
tevent_req_profile **)
+tevent_req_profile_create: struct tevent_req_profile *(TALLOC_CTX *)
+tevent_req_profile_get_name: void (const struct tevent_req_profile *, const 
char **)
+tevent_req_profile_get_start: void (const struct tevent_req_profile *, const 
char **, struct timeval *)
+tevent_req_profile_get_status: void (const struct tevent_req_profile *, pid_t 
*, enum tevent_req_state *, uint64_t *)
+tevent_req_profile_get_stop: void (const struct tevent_req_profile *, const 
char **, struct timeval *)
+tevent_req_profile_get_subprofiles: const struct tevent_req_profile *(const 
struct tevent_req_profile *)
+tevent_req_profile_next: const struct tevent_req_profile *(const struct 
tevent_req_profile *)
+tevent_req_profile_set_name: bool (struct tevent_req_profile *, const char *)
+tevent_req_profile_set_start: bool (struct tevent_req_profile *, const char *, 
struct timeval)
+tevent_req_profile_set_status: void (struct tevent_req_profile *, pid_t, enum 
tevent_req_state, uint64_t)
+tevent_req_profile_set_stop: bool (struct tevent_req_profile *, const char *, 
struct timeval)
 tevent_req_received: void (struct tevent_req *)
 tevent_req_reset_endtime: void (struct tevent_req *)
 tevent_req_set_callback: void (struct tevent_req *, tevent_req_fn, void *)
@@ -76,6 +101,7 @@ tevent_req_set_cancel_fn: void (struct tevent_req *, 
tevent_req_cancel_fn)
 tevent_req_set_cleanup_fn: void (struct tevent_req *, tevent_req_cleanup_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_req_set_profile: bool (struct tevent_req *)
 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 *)
diff --git a/lib/tevent/test_req.c b/lib/tevent/test_req.c
new file mode 100644
index 0000000..565ef31
--- /dev/null
+++ b/lib/tevent/test_req.c
@@ -0,0 +1,277 @@
+/*
+ * Unix SMB/CIFS implementation.
+ *
+ * testing of some tevent_req aspects
+ *
+ * Copyright (C) Volker Lendecke 2018
+ *
+ *   ** NOTE! The following LGPL license applies to the tevent
+ *   ** library. This does NOT imply that all of Samba is released
+ *   ** under the LGPL
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 3 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "includes.h"
+#include "tevent.h"
+#include "torture/torture.h"
+#include "torture/local/proto.h"
+#include "lib/util/tevent_unix.h"
+#include "lib/util/tevent_req_profile.h"
+#include "lib/util/time_basic.h"
+
+struct tevent_req_create_state {
+       uint8_t val;
+};
+
+static bool test_tevent_req_create(struct torture_context *tctx,
+                                  const void *test_data)
+{
+       struct tevent_req *req;
+       struct tevent_req_create_state *state;
+
+       req = tevent_req_create(tctx, &state,
+                               struct tevent_req_create_state);
+       torture_assert_not_null(tctx, req, "tevent_req_create failed\n");
+       torture_assert_int_equal(tctx, state->val, 0, "state not 
initialized\n");
+
+       TALLOC_FREE(req);
+
+       return true;
+}
+
+struct profile1_state {
+       uint8_t dummy;
+};
+
+static bool test_tevent_req_profile1(struct torture_context *tctx,
+                                    const void *test_data)
+{
+       struct tevent_req *req;
+       struct profile1_state *state;
+       const struct tevent_req_profile *p1;
+       struct tevent_req_profile *p2;
+       struct timeval start, stop;
+       bool ok;
+       int cmp;
+
+       req = tevent_req_create(tctx, &state, struct profile1_state);
+       torture_assert_not_null(tctx, req, "tevent_req_create failed\n");
+
+       p1 = tevent_req_get_profile(req);
+       torture_assert(tctx, p1 == NULL, "profile not initialized to NULL\n");
+
+       ok = tevent_req_set_profile(req);
+       torture_assert(tctx, ok, "set_profile failed\n");
+
+       tevent_req_done(req);
+
+       p2 = tevent_req_move_profile(req, tctx);
+       torture_assert_not_null(tctx, p2, "get_profile failed\n");
+
+       /* Demonstrate sure "p2" outlives req */
+       TALLOC_FREE(req);
+
+       tevent_req_profile_get_start(p2, NULL, &start);
+       tevent_req_profile_get_stop(p2, NULL, &stop);
+
+       cmp = tevent_timeval_compare(&start, &stop);
+       torture_assert(tctx, cmp <= 0, "stop before start\n");
+
+       TALLOC_FREE(p2);
+
+       return true;
+}
+
+struct profile2_state {
+       uint8_t dummy;
+};
+
+static void profile2_done(struct tevent_req *subreq);
+
+static struct tevent_req *profile2_send(TALLOC_CTX *mem_ctx,
+                                       struct tevent_context *ev)
+{
+       struct tevent_req *req, *subreq;
+       struct profile2_state *state;
+       bool ok;
+
+       req = tevent_req_create(mem_ctx, &state, struct profile2_state);
+       if (req == NULL) {
+               return NULL;
+       }
+
+       ok = tevent_req_set_profile(req);
+       if (!ok) {
+               return tevent_req_post(req, ev);
+       }
+
+       subreq = tevent_wakeup_send(
+               state,
+               ev,
+               tevent_timeval_current_ofs(0, 1));
+       if (tevent_req_nomem(subreq, req)) {
+               return tevent_req_post(req, ev);
+       }
+       tevent_req_set_callback(subreq, profile2_done, req);
+
+       return req;
+}
+
+static void profile2_done(struct tevent_req *subreq)
+{
+       struct tevent_req *req = tevent_req_callback_data(
+               subreq, struct tevent_req);
+       bool ok;
+
+       ok = tevent_wakeup_recv(subreq);
+       if (!ok) {
+               tevent_req_oom(req);
+               return;
+       }
+       tevent_req_done(req);
+}
+
+static int profile2_recv(struct tevent_req *req,
+                         TALLOC_CTX *mem_ctx,
+                         struct tevent_req_profile **profile)
+{
+       int err;
+
+       if (tevent_req_is_unix_error(req, &err)) {
+               return err;
+       }
+
+       *profile = tevent_req_move_profile(req, mem_ctx);
+
+       return 0;
+}
+
+static bool test_tevent_req_profile2(struct torture_context *tctx,
+                                    const void *test_data)
+{
+       struct tevent_context *ev;
+       struct tevent_req *req;
+       struct tevent_req_profile *p1 = NULL;
+       struct tevent_req_profile *p2 = NULL;
+       const char *str1, *str2;
+       struct timeval tv1, tv2;
+       pid_t pid1, pid2;
+       enum tevent_req_state state1, state2;
+       uint64_t err1, err2;
+       ssize_t pack_len;
+       int err;
+       bool ok;
+
+       ev = samba_tevent_context_init(tctx);
+       torture_assert_not_null(tctx, ev, "samba_tevent_context_init failed\n");
+
+       req = profile2_send(tctx, ev);
+       torture_assert_not_null(tctx, req, "profile2_send failed\n");
+
+       ok = tevent_req_poll_unix(req, ev, &err);
+       torture_assert(tctx, ok, "tevent_req_poll_unix failed\n");
+
+       err = profile2_recv(req, tctx, &p1);
+       torture_assert_int_equal(tctx, err, 0, "profile2_recv failed\n");
+
+       TALLOC_FREE(req);
+       TALLOC_FREE(ev);
+
+       tevent_req_profile_print(p1, stdout, 0, UINT_MAX);
+
+       pack_len = tevent_req_profile_pack(p1, NULL, 0);
+       torture_assert(tctx, pack_len>0, "profile_pack failed\n");
+
+       {
+               uint8_t buf[pack_len];
+               ssize_t unpack_len;
+
+               tevent_req_profile_pack(p1, buf, sizeof(buf));
+               dump_data(10, buf, sizeof(buf));
+
+               unpack_len = tevent_req_profile_unpack(
+                       buf,
+                       pack_len,
+                       tctx,
+                       &p2);
+               torture_assert_int_equal(tctx,
+                                        pack_len,
+                                        unpack_len,
+                                        "profile_unpack failed\n");
+       }
+
+       tevent_req_profile_print(p2, stdout, 0, UINT_MAX);
+
+       tevent_req_profile_get_name(p1, &str1);
+       tevent_req_profile_get_name(p2, &str2);
+       torture_assert_str_equal(tctx, str1, str2, "names differ\n");
+
+       tevent_req_profile_get_start(p1, &str1, &tv1);
+       tevent_req_profile_get_start(p2, &str2, &tv2);
+       torture_assert_str_equal(tctx, str1, str2, "start strings differ\n");
+       torture_assert(tctx,
+                      tevent_timeval_compare(&tv1, &tv2) == 0,
+                      "start times differ\n");
+
+       tevent_req_profile_get_stop(p1, &str1, &tv1);
+       tevent_req_profile_get_stop(p2, &str2, &tv2);
+       torture_assert_str_equal(tctx, str1, str2, "stop strings differ\n");
+       torture_assert(tctx,
+                      tevent_timeval_compare(&tv1, &tv2) == 0,
+                      "stop times differ\n");
+
+       tevent_req_profile_get_status(p1, &pid1, &state1, &err1);
+       tevent_req_profile_get_status(p2, &pid2, &state2, &err2);
+       torture_assert_int_equal(tctx, pid1, pid2, "pids differ\n");
+       torture_assert_int_equal(tctx, state1, state2, "states differ\n");
+       torture_assert_int_equal(tctx, err1, err2, "user errors differ\n");
+
+       str1 = tevent_req_profile_string(p1, p1, 0, UINT_MAX);
+       torture_assert_not_null(tctx, str1, "profile_string failed\n");
+       str2 = tevent_req_profile_string(p2, p2, 0, UINT_MAX);
+       torture_assert_not_null(tctx, str2, "profile_string failed\n");
+
+       torture_assert_str_equal(tctx, str1, str2, "result strings differ\n");
+
+       TALLOC_FREE(p1);
+       TALLOC_FREE(p2);
+
+       return true;
+}
+
+struct torture_suite *torture_local_tevent_req(TALLOC_CTX *mem_ctx)
+{
+       struct torture_suite *suite;
+
+       suite = torture_suite_create(mem_ctx, "tevent_req");
+
+       torture_suite_add_simple_tcase_const(
+               suite,
+               "create",
+               test_tevent_req_create,
+               NULL);
+       torture_suite_add_simple_tcase_const(
+               suite,
+               "profile1",
+               test_tevent_req_profile1,
+               NULL);
+       torture_suite_add_simple_tcase_const(
+               suite,
+               "profile2",
+               test_tevent_req_profile2,
+               NULL);
+
+       return suite;
+}
diff --git a/lib/tevent/testsuite.c b/lib/tevent/testsuite.c
index 63abbf2..b0f58ef 100644
--- a/lib/tevent/testsuite.c
+++ b/lib/tevent/testsuite.c
@@ -32,7 +32,7 @@
 #include "torture/torture.h"
 #include "torture/local/proto.h"
 #ifdef HAVE_PTHREAD
-#include <pthread.h>
+#include "system/threads.h"
 #include <assert.h>
 #endif
 
@@ -191,8 +191,9 @@ static bool test_event_context(struct torture_context *test,
        while (!finished) {
                errno = 0;
                if (tevent_loop_once(ev_ctx) == -1) {
-                       talloc_free(ev_ctx);
+                       TALLOC_FREE(ev_ctx);
                        torture_fail(test, talloc_asprintf(test, "Failed event 
loop %s\n", strerror(errno)));
+                       return false;
                }
        }
 
@@ -695,6 +696,511 @@ static bool test_event_fd2(struct torture_context *tctx,
        return true;
 }
 
+struct test_wrapper_state {
+       struct torture_context *tctx;
+       int num_events;
+       int num_wrap_handlers;
+};
+
+static bool test_wrapper_before_use(struct tevent_context *wrap_ev,
+                                   void *private_data,
+                                   struct tevent_context *main_ev,
+                                   const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+       return true;
+}
+
+static void test_wrapper_after_use(struct tevent_context *wrap_ev,
+                                  void *private_data,
+                                  struct tevent_context *main_ev,
+                                  const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+}
+
+static void test_wrapper_before_fd_handler(struct tevent_context *wrap_ev,
+                                          void *private_data,
+                                          struct tevent_context *main_ev,
+                                          struct tevent_fd *fde,
+                                          uint16_t flags,
+                                          const char *handler_name,
+                                          const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+}
+
+static void test_wrapper_after_fd_handler(struct tevent_context *wrap_ev,
+                                         void *private_data,
+                                         struct tevent_context *main_ev,
+                                         struct tevent_fd *fde,
+                                         uint16_t flags,
+                                         const char *handler_name,
+                                         const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+}
+
+static void test_wrapper_before_timer_handler(struct tevent_context *wrap_ev,
+                                             void *private_data,
+                                             struct tevent_context *main_ev,
+                                             struct tevent_timer *te,
+                                             struct timeval requested_time,
+                                             struct timeval trigger_time,
+                                             const char *handler_name,
+                                             const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+}
+
+static void test_wrapper_after_timer_handler(struct tevent_context *wrap_ev,
+                                            void *private_data,
+                                            struct tevent_context *main_ev,
+                                            struct tevent_timer *te,
+                                            struct timeval requested_time,
+                                            struct timeval trigger_time,
+                                            const char *handler_name,
+                                            const char *location)
+{
+       struct test_wrapper_state *state =
+               talloc_get_type_abort(private_data,
+               struct test_wrapper_state);
+
+       torture_comment(state->tctx, "%s\n", __func__);
+       state->num_wrap_handlers++;
+}
+
+static void test_wrapper_before_immediate_handler(struct tevent_context 
*wrap_ev,
+                                                 void *private_data,
+                                                 struct tevent_context 
*main_ev,
+                                                 struct tevent_immediate *im,


-- 
Samba Shared Repository

Reply via email to