summaryrefslogtreecommitdiff
path: root/source4/torture/torture.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-03-17 17:59:58 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:57:37 -0500
commitd09b70c98b8222eb293bc9d8713ec071188ed01d (patch)
treee24c521a4adaff0bdbe3938ff80dfc4e8a21c428 /source4/torture/torture.c
parent8437d5b8913d949b844448d84a003896f9694b94 (diff)
downloadsamba-d09b70c98b8222eb293bc9d8713ec071188ed01d.tar.gz
samba-d09b70c98b8222eb293bc9d8713ec071188ed01d.tar.bz2
samba-d09b70c98b8222eb293bc9d8713ec071188ed01d.zip
r14527: Fix build problems.
(This used to be commit 863ca4014d9b821706ee90f58ab5d5cf3899a4c7)
Diffstat (limited to 'source4/torture/torture.c')
-rw-r--r--source4/torture/torture.c74
1 files changed, 0 insertions, 74 deletions
diff --git a/source4/torture/torture.c b/source4/torture/torture.c
index d56e550703..a663a03beb 100644
--- a/source4/torture/torture.c
+++ b/source4/torture/torture.c
@@ -61,80 +61,6 @@ _PUBLIC_ BOOL use_level_II_oplocks;
_PUBLIC_ BOOL torture_showall = False;
-BOOL torture_open_connection_share(TALLOC_CTX *mem_ctx,
- struct smbcli_state **c,
- const char *hostname,
- const char *sharename,
- struct event_context *ev)
-{
- NTSTATUS status;
-
- status = smbcli_full_connection(mem_ctx, c, hostname,
- sharename, NULL,
- cmdline_credentials, ev);
- if (!NT_STATUS_IS_OK(status)) {
- printf("Failed to open connection - %s\n", nt_errstr(status));
- return False;
- }
-
- (*c)->transport->options.use_oplocks = use_oplocks;
- (*c)->transport->options.use_level2_oplocks = use_level_II_oplocks;
-
- return True;
-}
-
-_PUBLIC_ BOOL torture_open_connection(struct smbcli_state **c)
-{
- const char *host = lp_parm_string(-1, "torture", "host");
- const char *share = lp_parm_string(-1, "torture", "share");
-
- return torture_open_connection_share(NULL, c, host, share, NULL);
-}
-
-
-
-_PUBLIC_ BOOL torture_close_connection(struct smbcli_state *c)
-{
- BOOL ret = True;
- if (!c) return True;
- if (NT_STATUS_IS_ERR(smbcli_tdis(c))) {
- printf("tdis failed (%s)\n", smbcli_errstr(c->tree));
- ret = False;
- }
- talloc_free(c);
- return ret;
-}
-
-
-/* check if the server produced the expected error code */
-_PUBLIC_ BOOL check_error(const char *location, struct smbcli_state *c,
- uint8_t eclass, uint32_t ecode, NTSTATUS nterr)
-{
- NTSTATUS status;
-
- status = smbcli_nt_error(c->tree);
- if (NT_STATUS_IS_DOS(status)) {
- int class, num;
- class = NT_STATUS_DOS_CLASS(status);
- num = NT_STATUS_DOS_CODE(status);
- if (eclass != class || ecode != num) {
- printf("unexpected error code %s\n", nt_errstr(status));
- printf(" expected %s or %s (at %s)\n",
- nt_errstr(NT_STATUS_DOS(eclass, ecode)),
- nt_errstr(nterr), location);
- return False;
- }
- } else {
- if (!NT_STATUS_EQUAL(nterr, status)) {
- printf("unexpected error code %s\n", nt_errstr(status));
- printf(" expected %s (at %s)\n", nt_errstr(nterr), location);
- return False;
- }
- }
-
- return True;
-}
-
static BOOL wait_lock(struct smbcli_state *c, int fnum, uint32_t offset, uint32_t len)