svn commit: samba r16900 - in branches/SAMBA_4_0/source/torture/libnet: .

mimir at samba.org mimir at samba.org
Sun Jul 9 13:56:12 GMT 2006


Author: mimir
Date: 2006-07-09 13:56:11 +0000 (Sun, 09 Jul 2006)
New Revision: 16900

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

Log:
Nicer display of the test results.


rafal


Modified:
   branches/SAMBA_4_0/source/torture/libnet/libnet_lookup.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/libnet/libnet_lookup.c
===================================================================
--- branches/SAMBA_4_0/source/torture/libnet/libnet_lookup.c	2006-07-09 13:45:59 UTC (rev 16899)
+++ branches/SAMBA_4_0/source/torture/libnet/libnet_lookup.c	2006-07-09 13:56:11 UTC (rev 16900)
@@ -24,6 +24,7 @@
 #include "libnet/libnet.h"
 #include "librpc/gen_ndr/nbt.h"
 #include "librpc/rpc/dcerpc.h"
+#include "libcli/libcli.h"
 #include "torture/torture.h"
 
 
@@ -36,7 +37,6 @@
 	struct libnet_Lookup lookup;
 	struct dcerpc_binding *bind;
 	const char *bindstr;
-	const char *address;
 
 	mem_ctx = talloc_init("test_lookup");
 
@@ -126,6 +126,7 @@
 	TALLOC_CTX *mem_ctx;
 	struct libnet_context *ctx;
 	struct libnet_LookupDCs *lookup;
+	int i;
 
 	mem_ctx = talloc_init("test_lookup_pdc");
 
@@ -146,13 +147,20 @@
 	status = libnet_LookupDCs(ctx, mem_ctx, lookup);
 
 	if (!NT_STATUS_IS_OK(status)) {
-		printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name, nt_errstr(status));
+		printf("Couldn't lookup pdc %s: %s\n", lookup->in.domain_name,
+		       nt_errstr(status));
 		ret = False;
 		goto done;
 	}
 
 	ret = True;
 
+	printf("DCs of domain [%s] found.\n", lookup->in.domain_name);
+	for (i = 0; i < lookup->out.num_dcs; i++) {
+		printf("\tDC[%d]: name=%s, address=%s\n", i, lookup->out.dcs[i].name,
+		       lookup->out.dcs[i].address);
+	}
+
 done:
 	talloc_free(mem_ctx);
 	return ret;



More information about the samba-cvs mailing list