diff options
| author | Andrew Bartlett <abartlet@samba.org> | 2014-05-05 16:27:59 +1200 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2014-05-13 00:08:12 +0200 |
| commit | 7a347327a0bc43cb7fec5564d13787cead241517 (patch) | |
| tree | 0b5ada982cf71bdb596995440910b6e3d379f483 /source4/lib | |
| parent | 0927b0b01af3b0c423b99b2e45928d430147ede0 (diff) | |
s4:irpc/tests: make use explicit use of the top level event context
Andrew Bartlett
Change-Id: Ia193f97f62a1cb928aa814679578f90bde212013
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source4/lib')
| -rw-r--r-- | source4/lib/messaging/tests/irpc.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/lib/messaging/tests/irpc.c b/source4/lib/messaging/tests/irpc.c index 3515604e80..d78dc78492 100644 --- a/source4/lib/messaging/tests/irpc.c +++ b/source4/lib/messaging/tests/irpc.c @@ -74,8 +74,9 @@ static void deferred_echodata(struct tevent_context *ev, struct tevent_timer *te */ static NTSTATUS irpc_EchoData(struct irpc_message *irpc, struct echo_EchoData *r) { + struct irpc_test_data *data = talloc_get_type_abort(irpc->private_data, struct irpc_test_data); irpc->defer_reply = true; - tevent_add_timer(irpc->ev, irpc, timeval_zero(), deferred_echodata, irpc); + tevent_add_timer(data->ev, irpc, timeval_zero(), deferred_echodata, irpc); return NT_STATUS_OK; } @@ -261,11 +262,11 @@ static bool irpc_setup(struct torture_context *tctx, void **_data) "Failed to init second messaging context"); /* register the server side function */ - IRPC_REGISTER(data->msg_ctx1, rpcecho, ECHO_ADDONE, irpc_AddOne, NULL); - IRPC_REGISTER(data->msg_ctx2, rpcecho, ECHO_ADDONE, irpc_AddOne, NULL); + IRPC_REGISTER(data->msg_ctx1, rpcecho, ECHO_ADDONE, irpc_AddOne, data); + IRPC_REGISTER(data->msg_ctx2, rpcecho, ECHO_ADDONE, irpc_AddOne, data); - IRPC_REGISTER(data->msg_ctx1, rpcecho, ECHO_ECHODATA, irpc_EchoData, NULL); - IRPC_REGISTER(data->msg_ctx2, rpcecho, ECHO_ECHODATA, irpc_EchoData, NULL); + IRPC_REGISTER(data->msg_ctx1, rpcecho, ECHO_ECHODATA, irpc_EchoData, data); + IRPC_REGISTER(data->msg_ctx2, rpcecho, ECHO_ECHODATA, irpc_EchoData, data); return true; } |
