From 719cecba848b3e446ea3bc06f14cf90e9cddab9e Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Sat, 27 Feb 2010 10:02:40 +0100 Subject: s4:RPC-NETLOGON: remove useless rpc callback If we got a failure from one request we bail out early. metze --- source4/torture/rpc/netlogon.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) (limited to 'source4/torture') diff --git a/source4/torture/rpc/netlogon.c b/source4/torture/rpc/netlogon.c index 091f48a9c0a..c7bfb94e9db 100644 --- a/source4/torture/rpc/netlogon.c +++ b/source4/torture/rpc/netlogon.c @@ -2629,15 +2629,6 @@ static bool test_GetDomainInfo(struct torture_context *tctx, return true; } - -static void async_callback(struct rpc_request *req) -{ - int *counter = (int *)req->async.private_data; - if (NT_STATUS_IS_OK(req->status)) { - (*counter)++; - } -} - static bool test_GetDomainInfo_async(struct torture_context *tctx, struct dcerpc_pipe *p, struct cli_credentials *machine_credentials) @@ -2651,7 +2642,6 @@ static bool test_GetDomainInfo_async(struct torture_context *tctx, struct netlogon_creds_CredentialState *creds_async[ASYNC_COUNT]; struct rpc_request *req[ASYNC_COUNT]; int i; - int *async_counter = talloc(tctx, int); union netr_WorkstationInfo query; union netr_DomainInfo info; @@ -2680,17 +2670,12 @@ static bool test_GetDomainInfo_async(struct torture_context *tctx, query.workstation_info = &q1; - *async_counter = 0; - for (i=0;iasync.callback = async_callback; - req[i]->async.private_data = async_counter; - /* even with this flush per request a w2k3 server seems to clag with multiple outstanding requests. bleergh. */ torture_assert_int_equal(tctx, event_loop_once(dcerpc_event_context(p)), 0, @@ -2708,9 +2693,7 @@ static bool test_GetDomainInfo_async(struct torture_context *tctx, } torture_comment(tctx, - "Testing netr_LogonGetDomainInfo - async count %d OK\n", *async_counter); - - torture_assert_int_equal(tctx, (*async_counter), ASYNC_COUNT, "int"); + "Testing netr_LogonGetDomainInfo - async count %d OK\n", ASYNC_COUNT); return true; } -- cgit v1.2.1