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

metze at samba.org metze at samba.org
Mon Dec 5 10:15:57 GMT 2005


Author: metze
Date: 2005-12-05 10:15:56 +0000 (Mon, 05 Dec 2005)
New Revision: 12068

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

Log:
a better fix to prevent crashing, on errors

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-12-05 10:03:10 UTC (rev 12067)
+++ branches/SAMBA_4_0/source/torture/nbt/winsreplication.c	2005-12-05 10:15:56 UTC (rev 12068)
@@ -1096,8 +1096,6 @@
 		}
 	};
 
-	if (!ctx) return False;
-
 	name.name	= "_SAME_OWNER_A";
 	name.type	= 0;
 	name.scope	= NULL;
@@ -4634,8 +4632,6 @@
 		}
 	}}; /* do not add entries here, this should be the last record! */
 
-	if (!ctx) return False;
-
 	wins_name_r1	= &wins_name1;
 	wins_name_r2	= &wins_name2;
 
@@ -6385,8 +6381,6 @@
 	},
 	};
 
-	if (!ctx) return False;
-
 	printf("Test Replica records vs. owned released records\n");
 
 	for(i=0; ret && i < ARRAY_SIZE(records); i++) {
@@ -9018,8 +9012,6 @@
 	},
 	};
 
-	if (!ctx) return False;
-
 	if (!ctx->nbtsock_srv) {
 		printf("SKIP: Test Replica records vs. owned active records: not bound to port[%d]\n",
 			lp_nbt_port());
@@ -9511,6 +9503,7 @@
 	ret &= test_wins_replication(mem_ctx, address);
 
 	ctx = test_create_conflict_ctx(mem_ctx, address);
+	if (!ctx) return False;
 
 	ret &= test_conflict_same_owner(ctx);
 	ret &= test_conflict_owned_released_vs_replica(ctx);
@@ -9549,6 +9542,7 @@
 	ret &= test_wins_replication(mem_ctx, address);
 
 	ctx = test_create_conflict_ctx(mem_ctx, address);
+	if (!ctx) return False;
 
 	ret &= test_conflict_same_owner(ctx);
 	ret &= test_conflict_different_owner(ctx);



More information about the samba-cvs mailing list