svn commit: samba r11802 - in branches/SAMBA_4_0/source/torture/nbt: .

metze at samba.org metze at samba.org
Sat Nov 19 10:40:32 GMT 2005


Author: metze
Date: 2005-11-19 10:40:31 +0000 (Sat, 19 Nov 2005)
New Revision: 11802

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

Log:
- add copyright
- fix crash bug when running as non root
- add extra comments in the output

metze
Modified:
   branches/SAMBA_4_0/source/torture/nbt/winsreplication.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/nbt/winsreplication.c
===================================================================
--- branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-11-19 06:39:12 UTC (rev 11801)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-11-19 10:40:31 UTC (rev 11802)
@@ -3,7 +3,8 @@
 
    WINS replication testing
 
-   Copyright (C) Andrew Tridgell 2005
+   Copyright (C) Andrew Tridgell	2005
+   Copyright (C) Stefan Metzmacher	2005
    
    This program is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -483,7 +484,7 @@
 		ctx->nbtsock_srv = NULL;
 	}
 
-	if (ctx->myaddr2) {
+	if (ctx->myaddr2 && ctx->nbtsock_srv) {
 		ctx->nbtsock2 = nbt_name_socket_init(ctx, NULL);
 		if (!ctx->nbtsock2) return NULL;
 
@@ -1007,6 +1008,7 @@
 	struct {
 		const char *line; /* just better debugging */
 		struct nbt_name name;
+		const char *comment;
 		BOOL extra; /* not the worst case, this is an extra test */
 		BOOL cleanup;
 		struct {
@@ -3747,6 +3749,7 @@
 	{
 		.line	= __location__,
 		.name	= _NBT_NAME("_DIFF_OWNER", 0x00, NULL),
+		.comment= "but owner changed",
 		.extra	= True,
 		.r1	= {
 			.owner		= &ctx->a,
@@ -3873,14 +3876,17 @@
 				ips = "different";
 			}
 
-			printf("%s,%s%s vs. %s,%s%s with %s ip(s) => %s\n",
+			printf("%s,%s%s vs. %s,%s%s with %s ip(s)%s%s => %s\n",
 				wrepl_name_type_string(records[i].r1.type),
 				wrepl_name_state_string(records[i].r1.state),
 				(records[i].r1.is_static?",static":""),
 				wrepl_name_type_string(records[i].r2.type),
 				wrepl_name_state_string(records[i].r2.state),
 				(records[i].r2.is_static?",static":""),
-				ips, expected);
+				ips,
+				(records[i].comment?" ":""),
+				(records[i].comment?records[i].comment:""),
+				expected);
 		}
 
 		/*



More information about the samba-cvs mailing list