summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2004-08-30 03:10:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:58:24 -0500
commite7f36ff1a5ec909573ef398d215608e7c9aa71fe (patch)
tree8874e1dbc422a02631e48c772dc8749f255819aa /source4/torture
parent18bbab726884725ccf2f3264223866194855f320 (diff)
downloadsamba-e7f36ff1a5ec909573ef398d215608e7c9aa71fe.tar.gz
samba-e7f36ff1a5ec909573ef398d215608e7c9aa71fe.tar.bz2
samba-e7f36ff1a5ec909573ef398d215608e7c9aa71fe.zip
r2100: rework the dcerpc client side library so that it is async. We now
generate a separate *_send() async function for every RPC call, and there is a single dcerpc_ndr_request_recv() call that processes the receive side of any rpc call. The caller can use dcerpc_event_context() to get a pointer to the event context for the pipe so that events can be waited for asynchronously. The only part that remains synchronous is the initial bind calls. These could also be made async if necessary, although I suspect most applications won't need them to be. (This used to be commit f5d004d8eb8c76c03342cace1976b27266cfa1f0)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/rpc/drsuapi.c2
-rw-r--r--source4/torture/rpc/epmapper.c12
-rw-r--r--source4/torture/rpc/testjoin.c2
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/torture/rpc/drsuapi.c b/source4/torture/rpc/drsuapi.c
index 5a12ef37f4..d056ab92da 100644
--- a/source4/torture/rpc/drsuapi.c
+++ b/source4/torture/rpc/drsuapi.c
@@ -197,7 +197,7 @@ static BOOL test_DRSBind(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx)
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(p->last_fault_code);
+ errstr = dcerpc_errstr(mem_ctx, p->last_fault_code);
}
printf("DRSUAPI_BIND level failed - %s\n", errstr);
ret = False;
diff --git a/source4/torture/rpc/epmapper.c b/source4/torture/rpc/epmapper.c
index 9f5c337f15..6a50d18276 100644
--- a/source4/torture/rpc/epmapper.c
+++ b/source4/torture/rpc/epmapper.c
@@ -151,15 +151,15 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
twr->towers.floors[2].lhs.protocol = EPM_PROTOCOL_NCACN_RPC_C;
twr->towers.floors[2].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[2].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2);
+ twr->towers.floors[2].rhs.rhs_data = data_blob_talloc_zero(p, 2);
twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_TCP;
twr->towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2);
+ twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p, 2);
twr->towers.floors[4].lhs.protocol = EPM_PROTOCOL_NCACN_IP;
twr->towers.floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 4);
+ twr->towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p, 4);
status = dcerpc_epm_Map(p, mem_ctx, &r);
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
@@ -172,7 +172,7 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_HTTP;
twr->towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2);
+ twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p, 2);
status = dcerpc_epm_Map(p, mem_ctx, &r);
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
@@ -185,11 +185,11 @@ static BOOL test_Map(struct dcerpc_pipe *p, TALLOC_CTX *mem_ctx,
twr->towers.floors[3].lhs.protocol = EPM_PROTOCOL_NCACN_SMB;
twr->towers.floors[3].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2);
+ twr->towers.floors[3].rhs.rhs_data = data_blob_talloc_zero(p, 2);
twr->towers.floors[4].lhs.protocol = EPM_PROTOCOL_NCACN_NETBIOS;
twr->towers.floors[4].lhs.info.lhs_data = data_blob(NULL, 0);
- twr->towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p->mem_ctx, 2);
+ twr->towers.floors[4].rhs.rhs_data = data_blob_talloc_zero(p, 2);
status = dcerpc_epm_Map(p, mem_ctx, &r);
if (NT_STATUS_IS_OK(status) && r.out.result == 0) {
diff --git a/source4/torture/rpc/testjoin.c b/source4/torture/rpc/testjoin.c
index 9c9fd749fb..32ea6c5ce4 100644
--- a/source4/torture/rpc/testjoin.c
+++ b/source4/torture/rpc/testjoin.c
@@ -141,7 +141,7 @@ void *torture_join_domain(const char *machine_name,
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(join->p->last_fault_code);
+ errstr = dcerpc_errstr(mem_ctx, join->p->last_fault_code);
}
printf("samr_Connect failed - %s\n", errstr);
goto failed;