From 4639eb5a58f8c0906afdc8e8f8f67f82e9547f75 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Sun, 8 Feb 2004 00:51:07 +0000 Subject: Convert libcli routines to use cli_tree instead of cli_state. Port smbtorture to use the new interface. Part 2 will be to eliminate cli_state from smbtorture as this is now the only place where it is used. (This used to be commit db1cc96af62ea42837d60592877fc3f93cef143b) --- source4/torture/raw/search.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'source4/torture/raw/search.c') diff --git a/source4/torture/raw/search.c b/source4/torture/raw/search.c index 301a9f0077..164c9bb4d8 100644 --- a/source4/torture/raw/search.c +++ b/source4/torture/raw/search.c @@ -116,7 +116,7 @@ static BOOL test_one_file(struct cli_state *cli, TALLOC_CTX *mem_ctx) fnum = create_complex_file(cli, mem_ctx, fname); if (fnum == -1) { - printf("ERROR: open of %s failed (%s)\n", fname, cli_errstr(cli)); + printf("ERROR: open of %s failed (%s)\n", fname, cli_errstr(cli->tree)); ret = False; goto done; } @@ -338,7 +338,7 @@ static BOOL test_one_file(struct cli_state *cli, TALLOC_CTX *mem_ctx) done: smb_raw_exit(cli->session); - cli_unlink(cli, fname); + cli_unlink(cli->tree, fname); return ret; } @@ -550,9 +550,9 @@ static BOOL test_many_files(struct cli_state *cli, TALLOC_CTX *mem_ctx) {"SEARCH", "ID", RAW_SEARCH_SEARCH, CONT_RESUME_KEY} }; - if (cli_deltree(cli, BASEDIR) == -1 || - !cli_mkdir(cli, BASEDIR)) { - printf("Failed to create " BASEDIR " - %s\n", cli_errstr(cli)); + if (cli_deltree(cli->tree, BASEDIR) == -1 || + !cli_mkdir(cli->tree, BASEDIR)) { + printf("Failed to create " BASEDIR " - %s\n", cli_errstr(cli->tree)); return False; } @@ -560,14 +560,14 @@ static BOOL test_many_files(struct cli_state *cli, TALLOC_CTX *mem_ctx) for (i=0;itree, fname, O_CREAT|O_RDWR, DENY_NONE); if (fnum == -1) { - printf("Failed to create %s - %s\n", fname, cli_errstr(cli)); + printf("Failed to create %s - %s\n", fname, cli_errstr(cli->tree)); ret = False; goto done; } free(fname); - cli_close(cli, fnum); + cli_close(cli->tree, fnum); } @@ -627,7 +627,7 @@ static BOOL test_many_files(struct cli_state *cli, TALLOC_CTX *mem_ctx) done: smb_raw_exit(cli->session); - cli_deltree(cli, BASEDIR); + cli_deltree(cli->tree, BASEDIR); return ret; } -- cgit