From d09b70c98b8222eb293bc9d8713ec071188ed01d Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 17 Mar 2006 17:59:58 +0000 Subject: r14527: Fix build problems. (This used to be commit 863ca4014d9b821706ee90f58ab5d5cf3899a4c7) --- source4/torture/torture.c | 74 ----------------------------------------------- 1 file changed, 74 deletions(-) (limited to 'source4/torture/torture.c') 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) -- cgit