From 07fdc2c73e03dad5b6030db0e8e488a3834796f5 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 28 Nov 2003 03:47:45 +0000 Subject: * support multiple interfaces in one IDL file in pidl * make far more generated functions static * get rid of gen_rpc, and include the client calls in ndr_*.c * added placeholder IDL for a number of intefaces (dcom, wzcsvc, browser etc) (This used to be commit a2bdf0be0119023df3c2b9ea515ed355020f2625) --- source4/torture/rpc/scanner.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) (limited to 'source4/torture/rpc/scanner.c') diff --git a/source4/torture/rpc/scanner.c b/source4/torture/rpc/scanner.c index 9c94515ea3..3469294552 100644 --- a/source4/torture/rpc/scanner.c +++ b/source4/torture/rpc/scanner.c @@ -47,27 +47,32 @@ static BOOL test_num_calls(const struct dcerpc_interface_table *iface, } /* make null calls */ - stub_in = data_blob(NULL, 0); - - status = dcerpc_request(p, 10000, mem_ctx, &stub_in, &stub_out); - if (NT_STATUS_IS_OK(status) || - p->last_fault_code != DCERPC_FAULT_OP_RNG_ERROR) { - printf("\tunable to determine call count - %s %08x\n", - nt_errstr(status), p->last_fault_code); - goto done; - } + stub_in = data_blob(NULL, 1000); + memset(stub_in.data, 0xFF, stub_in.length); - for (i=128;i>=0;i--) { + for (i=0;i<200;i++) { status = dcerpc_request(p, i, mem_ctx, &stub_in, &stub_out); - if (NT_STATUS_IS_OK(status) || - p->last_fault_code != DCERPC_FAULT_OP_RNG_ERROR) break; + if (!NT_STATUS_IS_OK(status) && + p->last_fault_code == DCERPC_FAULT_OP_RNG_ERROR) { + break; + } + + if (!NT_STATUS_IS_OK(status) && p->last_fault_code == 5) { + printf("\tpipe disconnected at %d\n", i); + goto done; + } + + if (!NT_STATUS_IS_OK(status) && p->last_fault_code == 0x80010111) { + printf("\terr 0x80010111 at %d\n", i); + goto done; + } } - printf("\t%d calls available\n", i+1); + printf("\t%d calls available\n", i); idl_calls = idl_num_calls(uuid, id->major_version); if (idl_calls == -1) { printf("\tinterface not known in local IDL\n"); - } else if (i+1 != idl_calls) { + } else if (i != idl_calls) { printf("\tWARNING: local IDL defines %u calls\n", idl_calls); } else { printf("\tOK: matches num_calls in local IDL\n"); -- cgit