From aaff29f5b472468e0ffbfc9bf33eead16bdb111c Mon Sep 17 00:00:00 2001 From: Kamen Mazdrashki Date: Sat, 14 Nov 2009 15:51:53 +0200 Subject: [PATCH] s4/drs(tort): use torture_drsuapi_assert_call() macro for error checking Signed-off-by: Andrew Bartlett --- source4/torture/rpc/dssync.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/source4/torture/rpc/dssync.c b/source4/torture/rpc/dssync.c index 7d8dc9216a3..ab17359ae59 100644 --- a/source4/torture/rpc/dssync.c +++ b/source4/torture/rpc/dssync.c @@ -875,17 +875,8 @@ static bool test_FetchData(struct torture_context *tctx, struct DsSyncTest *ctx) } status = dcerpc_drsuapi_DsGetNCChanges(ctx->new_dc.drsuapi.drs_pipe, ctx, &r); - if (!NT_STATUS_IS_OK(status)) { - const char *errstr = nt_errstr(status); - if (NT_STATUS_EQUAL(status, NT_STATUS_NET_WRITE_FAULT)) { - errstr = dcerpc_errstr(ctx, ctx->new_dc.drsuapi.drs_pipe->last_fault_code); - } - printf("dcerpc_drsuapi_DsGetNCChanges failed - %s\n", errstr); - ret = false; - } else if (!W_ERROR_IS_OK(r.out.result)) { - printf("DsGetNCChanges failed - %s\n", win_errstr(r.out.result)); - ret = false; - } + torture_drsuapi_assert_call(tctx, ctx->new_dc.drsuapi.drs_pipe, status, + &r, "dcerpc_drsuapi_DsGetNCChanges"); if (ret == true && *r.out.level_out == 1) { out_level = 1; -- 2.11.4.GIT