summaryrefslogtreecommitdiff
path: root/source4/torture/aliases.c
diff options
context:
space:
mode:
authorTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
committerTim Potter <tpot@samba.org>2004-02-08 00:51:07 +0000
commit4639eb5a58f8c0906afdc8e8f8f67f82e9547f75 (patch)
tree2115d25166961cea7d49836d53a05e98c796ff8a /source4/torture/aliases.c
parentf0c9a54b30cfa627b4ddcbc24fe943b21472df34 (diff)
downloadsamba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.gz
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.tar.bz2
samba-4639eb5a58f8c0906afdc8e8f8f67f82e9547f75.zip
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)
Diffstat (limited to 'source4/torture/aliases.c')
-rw-r--r--source4/torture/aliases.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/source4/torture/aliases.c b/source4/torture/aliases.c
index feb940eb42..9c8c366fd1 100644
--- a/source4/torture/aliases.c
+++ b/source4/torture/aliases.c
@@ -118,20 +118,20 @@ static void qfileinfo_aliases(struct cli_state *cli)
t2.in.params = data_blob(NULL, 4);
t2.in.data = data_blob(NULL, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, 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));
}
- cli_write(cli, fnum, 0, (char *)&t2, 0, sizeof(t2));
+ cli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2));
SSVAL(t2.in.params.data, 0, fnum);
gen_aliases(cli, &t2, 2);
- cli_close(cli, fnum);
- cli_unlink(cli, fname);
+ cli_close(cli->tree, fnum);
+ cli_unlink(cli->tree, fname);
}
@@ -158,14 +158,14 @@ static void qpathinfo_aliases(struct cli_state *cli)
t2.in.params = data_blob_talloc(mem_ctx, NULL, 6);
t2.in.data = data_blob(NULL, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, 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));
}
- cli_write(cli, fnum, 0, (char *)&t2, 0, sizeof(t2));
- cli_close(cli, fnum);
+ cli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2));
+ cli_close(cli->tree, fnum);
SIVAL(t2.in.params.data, 2, 0);
@@ -174,7 +174,7 @@ static void qpathinfo_aliases(struct cli_state *cli)
gen_aliases(cli, &t2, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
talloc_destroy(mem_ctx);
}
@@ -202,14 +202,14 @@ static void findfirst_aliases(struct cli_state *cli)
t2.in.params = data_blob_talloc(mem_ctx, NULL, 12);
t2.in.data = data_blob(NULL, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, 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));
}
- cli_write(cli, fnum, 0, (char *)&t2, 0, sizeof(t2));
- cli_close(cli, fnum);
+ cli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2));
+ cli_close(cli->tree, fnum);
SSVAL(t2.in.params.data, 0, 0);
SSVAL(t2.in.params.data, 2, 1);
@@ -222,7 +222,7 @@ static void findfirst_aliases(struct cli_state *cli)
gen_aliases(cli, &t2, 6);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
talloc_destroy(mem_ctx);
}
@@ -314,21 +314,21 @@ static void setfileinfo_aliases(struct cli_state *cli)
t2.in.params = data_blob(NULL, 6);
t2.in.data = data_blob(NULL, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, 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));
}
- cli_write(cli, fnum, 0, (char *)&t2, 0, sizeof(t2));
+ cli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2));
SSVAL(t2.in.params.data, 0, fnum);
SSVAL(t2.in.params.data, 4, 0);
gen_set_aliases(cli, &t2, 2);
- cli_close(cli, fnum);
- cli_unlink(cli, fname);
+ cli_close(cli->tree, fnum);
+ cli_unlink(cli->tree, fname);
}
/* look for setpathinfo aliases */
@@ -354,15 +354,15 @@ static void setpathinfo_aliases(struct cli_state *cli)
t2.in.params = data_blob_talloc(mem_ctx, NULL, 4);
t2.in.data = data_blob(NULL, 0);
- cli_unlink(cli, fname);
+ cli_unlink(cli->tree, fname);
fnum = create_complex_file(cli, 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));
}
- cli_write(cli, fnum, 0, (char *)&t2, 0, sizeof(t2));
- cli_close(cli, fnum);
+ cli_write(cli->tree, fnum, 0, (char *)&t2, 0, sizeof(t2));
+ cli_close(cli->tree, fnum);
SSVAL(t2.in.params.data, 2, 0);
@@ -371,8 +371,8 @@ static void setpathinfo_aliases(struct cli_state *cli)
gen_set_aliases(cli, &t2, 0);
- if (!cli_unlink(cli, fname)) {
- printf("unlink: %s\n", cli_errstr(cli));
+ if (!cli_unlink(cli->tree, fname)) {
+ printf("unlink: %s\n", cli_errstr(cli->tree));
}
talloc_destroy(mem_ctx);
}