From 6d52aa1fc892b48d72a790800ee00d6d7bdc4844 Mon Sep 17 00:00:00 2001 From: Richard Sharpe Date: Thu, 18 Apr 2002 18:36:17 +0000 Subject: [PATCH] Back out the wrong changes I made yesterday ... --- source/torture/nbio.c | 13 ++++--------- source/torture/torture.c | 4 ++-- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/source/torture/nbio.c b/source/torture/nbio.c index bf9305f8e89..2d519b40bac 100644 --- a/source/torture/nbio.c +++ b/source/torture/nbio.c @@ -137,7 +137,7 @@ void nb_unlink(char *fname) void nb_createx(char *fname, - unsigned create_options, unsigned create_disposition, int handle, int no_err) + unsigned create_options, unsigned create_disposition, int handle) { int fd, i; uint32 desired_access; @@ -157,7 +157,7 @@ void nb_createx(char *fname, if (fd == -1 && handle != -1) { printf("ERROR: cli_nt_create_full failed for %s - %s\n", fname, cli_errstr(c)); - if (!no_err) exit(1); + exit(1); } if (fd != -1 && handle == -1) { printf("ERROR: cli_nt_create_full succeeded for %s\n", fname); @@ -206,15 +206,10 @@ void nb_readx(int handle, int offset, int size, int ret_size) children[nbio_id].bytes_in += ret_size; } -void nb_close(int handle, int no_err) +void nb_close(int handle) { int i; - if (no_err) { - i = ne_find_handle(handle); - if (i < 0) return; - } - else - i = find_handle(handle); + i = find_handle(handle); if (!cli_close(c, ftable[i].fd)) { printf("(%d) close failed on handle %d\n", line_count, handle); exit(1); diff --git a/source/torture/torture.c b/source/torture/torture.c index cce39d21129..23624d07333 100644 --- a/source/torture/torture.c +++ b/source/torture/torture.c @@ -707,9 +707,9 @@ static BOOL run_netbench(int client) if (!strcmp(params[0],"NTCreateX")) { nb_createx(params[1], ival(params[2]), ival(params[3]), - ival(params[4]),ival(params[5])); + ival(params[4])); } else if (!strcmp(params[0],"Close")) { - nb_close(ival(params[1]),ival(params[2])); + nb_close(ival(params[1])); } else if (!strcmp(params[0],"Rename")) { nb_rename(params[1], params[2]); } else if (!strcmp(params[0],"Unlink")) { -- 2.11.4.GIT