summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2007-06-17 21:54:11 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:53:25 -0500
commitdc4f1f6754df874bb135a708b1c9327c06fe5ae3 (patch)
tree096ab023e3b439be07b9a55de22771b745377794
parent551575012b5120f420e346fe70890e03c6fb37bf (diff)
downloadsamba-dc4f1f6754df874bb135a708b1c9327c06fe5ae3.tar.gz
samba-dc4f1f6754df874bb135a708b1c9327c06fe5ae3.tar.bz2
samba-dc4f1f6754df874bb135a708b1c9327c06fe5ae3.zip
r23535: accept numeric ntstatus codes in nbench load files (ronnies wireshark
script generates numeric codes) (This used to be commit 455895c4b1651bc74f2f64514344d3561a2cd5bb)
-rw-r--r--source4/torture/nbench/nbench.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source4/torture/nbench/nbench.c b/source4/torture/nbench/nbench.c
index b55998e43f..021d172b4f 100644
--- a/source4/torture/nbench/nbench.c
+++ b/source4/torture/nbench/nbench.c
@@ -48,7 +48,7 @@ static BOOL run_netbench(struct torture_context *tctx, struct smbcli_state *cli,
BOOL correct = True;
double target_rate = lp_parm_double(-1, "torture", "targetrate", 0);
- if (target_rate != 0) {
+ if (target_rate != 0 && client == 0) {
printf("Targetting %.4f MByte/sec\n", target_rate);
}
@@ -106,13 +106,19 @@ again:
exit(1);
}
- if (strncmp(params[i-1], "NT_STATUS_", 10) != 0) {
+ if (strncmp(params[i-1], "NT_STATUS_", 10) != 0 &&
+ strncmp(params[i-1], "0x", 2) != 0) {
printf("Badly formed status at line %d\n", nbench_line_count);
talloc_free(params);
continue;
}
- status = nt_status_string_to_code(params[i-1]);
+ /* accept numeric or string status codes */
+ if (strncmp(params[i-1], "0x", 2) == 0) {
+ status = NT_STATUS(strtoul(params[i-1], NULL, 16));
+ } else {
+ status = nt_status_string_to_code(params[i-1]);
+ }
DEBUG(9,("run_netbench(%d): %s %s\n", client, params[0], params[1]));