From adf6142953c4fa81493f133d45eb80d91b069e47 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 9 Nov 2003 07:24:06 +0000 Subject: converted the rpcecho pipe to use IDL (This used to be commit 1b7a7bc4641e4f0e604bc20699c094fa5f49315d) --- source4/torture/rpc/echo.c | 52 ++++++++++++++++++++++++++-------------------- 1 file changed, 29 insertions(+), 23 deletions(-) (limited to 'source4/torture/rpc') diff --git a/source4/torture/rpc/echo.c b/source4/torture/rpc/echo.c index 8780b39f87..ebf82c692e 100644 --- a/source4/torture/rpc/echo.c +++ b/source4/torture/rpc/echo.c @@ -33,13 +33,16 @@ static BOOL test_addone(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) printf("\nTesting AddOne\n"); for (i=0;i<10;i++) { - int n; - status = dcerpc_rpcecho_addone(p, i, &n); + uint32 n = i; + struct echo_AddOne r; + r.in.v = &n; + r.out.v = &n; + status = dcerpc_echo_AddOne(p, mem_ctx, &r); if (!NT_STATUS_IS_OK(status)) { printf("AddOne(%d) failed - %s\n", i, nt_errstr(status)); return False; } - printf("%d + 1 = %d\n", i, n); + printf("%d + 1 = %u\n", i, n); } return True; @@ -54,28 +57,28 @@ static BOOL test_echodata(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx) NTSTATUS status; char *data_in, *data_out; int len = 1 + (random() % 5000); - int len_out; + struct echo_EchoData r; printf("\nTesting EchoData\n"); data_in = talloc(mem_ctx, len); + data_out = talloc(mem_ctx, len); for (i=0;i