summaryrefslogtreecommitdiff
path: root/source4/torture/torture.c
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2003-11-24 11:45:33 +0000
committerAndrew Tridgell <tridge@samba.org>2003-11-24 11:45:33 +0000
commitbbb11d4a0dc02a6125855620e0a59a6b24107e4d (patch)
treeeccf9712b09d9936a5e8eed05c72596a3e8035c7 /source4/torture/torture.c
parent5e64ecac2f2de4888d83872aaf273e3c1882c772 (diff)
downloadsamba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.tar.gz
samba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.tar.bz2
samba-bbb11d4a0dc02a6125855620e0a59a6b24107e4d.zip
* prepared the dcerpc subsystem for adding the RPC over TCP transport
* fixed a uninitialised variable bug in pidl (found by valgrind) (This used to be commit 8bce61b8af6351c72c0dd84dc61b49d8aeb1fbbd)
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r--source4/torture/torture.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index e13933a231..c07b516baa 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -143,14 +143,11 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
return NT_STATUS_UNSUCCESSFUL;
}
- if (!(*p = dcerpc_pipe_init(cli->tree))) {
- return NT_STATUS_NO_MEMORY;
- }
-
- status = dcerpc_pipe_open_smb(*p, pipe_name, pipe_uuid, pipe_version);
+ status = dcerpc_pipe_open_smb(p, cli->tree, pipe_name, pipe_uuid, pipe_version);
if (!NT_STATUS_IS_OK(status)) {
printf("Open of pipe '%s' failed with error (%s)\n",
pipe_name, nt_errstr(status));
+ torture_close_connection(cli);
return status;
}
@@ -163,17 +160,8 @@ NTSTATUS torture_rpc_connection(struct dcerpc_pipe **p,
/* close a rpc connection to a named pipe */
NTSTATUS torture_rpc_close(struct dcerpc_pipe *p)
{
- union smb_close io;
- NTSTATUS status;
-
- io.close.level = RAW_CLOSE_CLOSE;
- io.close.in.fnum = p->fnum;
- io.close.in.write_time = 0;
- status = smb_raw_close(p->tree, &io);
-
dcerpc_pipe_close(p);
-
- return status;
+ return NT_STATUS_OK;
}