summaryrefslogtreecommitdiff
path: root/source4/torture/nbench
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2005-09-30 21:48:25 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:39:15 -0500
commite3b8d856aae403f8b540d6c983303226ca20b4a8 (patch)
tree3966046607f756edf142c748d9ac2724e8eeeea7 /source4/torture/nbench
parent7368af9e7466494e4a69584634b48cbac937d1db (diff)
downloadsamba-e3b8d856aae403f8b540d6c983303226ca20b4a8.tar.gz
samba-e3b8d856aae403f8b540d6c983303226ca20b4a8.tar.bz2
samba-e3b8d856aae403f8b540d6c983303226ca20b4a8.zip
r10662: Eliminate pstring and friends.
(This used to be commit ecef1ee6cd0bdae2fcbff3f57edaa26eb72f3481)
Diffstat (limited to 'source4/torture/nbench')
-rw-r--r--source4/torture/nbench/nbench.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index 9b3c9cdb5a..74bfe3e57a 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -37,8 +37,7 @@ static BOOL run_netbench(struct smbcli_state *cli, int client)
pstring line;
char *cname;
FILE *f;
- fstring params[20];
- const char *p;
+ const char **params;
BOOL correct = True;
if (torture_nprocs == 1) {
@@ -68,12 +67,8 @@ again:
all_string_sub(line,"client1", cname, sizeof(line));
- p = line;
- for (i=0;
- i<19 && next_token(&p, params[i], " ", sizeof(fstring));
- i++) ;
-
- params[i][0] = 0;
+ params = str_list_make_shell(NULL, line, " ");
+ i = str_list_length(params);
if (i < 2 || params[0][0] == '#') continue;
@@ -84,6 +79,7 @@ again:
if (strncmp(params[i-1], "NT_STATUS_", 10) != 0) {
printf("Badly formed status at line %d\n", nbench_line_count);
+ talloc_free(params);
continue;
}
@@ -142,6 +138,8 @@ again:
} else {
printf("[%d] Unknown operation %s\n", nbench_line_count, params[0]);
}
+
+ talloc_free(params);
if (nb_tick()) goto done;
}