svn commit: samba r23535 - in branches/SAMBA_4_0/source/torture/nbench: .

tridge at samba.org tridge at samba.org
Sun Jun 17 21:54:12 GMT 2007


Author: tridge
Date: 2007-06-17 21:54:11 +0000 (Sun, 17 Jun 2007)
New Revision: 23535

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23535

Log:

accept numeric ntstatus codes in nbench load files (ronnies wireshark
script generates numeric codes)

Modified:
   branches/SAMBA_4_0/source/torture/nbench/nbench.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbench/nbench.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbench/nbench.c	2007-06-17 20:04:57 UTC (rev 23534)
+++ branches/SAMBA_4_0/source/torture/nbench/nbench.c	2007-06-17 21:54:11 UTC (rev 23535)
@@ -48,7 +48,7 @@
 	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 @@
 			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]));
 



More information about the samba-cvs mailing list