diff options
author | Andrew Tridgell <tridge@samba.org> | 2003-11-28 03:47:45 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2003-11-28 03:47:45 +0000 |
commit | 07fdc2c73e03dad5b6030db0e8e488a3834796f5 (patch) | |
tree | 572ab828b52cfa9cf6887acd5049c41f279ece2c /source4/torture/rpc | |
parent | df5949efb425668f8e7ae38c0c858bd90529255a (diff) | |
download | samba-07fdc2c73e03dad5b6030db0e8e488a3834796f5.tar.gz samba-07fdc2c73e03dad5b6030db0e8e488a3834796f5.tar.bz2 samba-07fdc2c73e03dad5b6030db0e8e488a3834796f5.zip |
* 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)
Diffstat (limited to 'source4/torture/rpc')
-rw-r--r-- | source4/torture/rpc/scanner.c | 33 |
1 files changed, 19 insertions, 14 deletions
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"); |