svn commit: samba r9155 - in branches/SAMBA_4_0/source/torture/rpc: .

tpot at samba.org tpot at samba.org
Sat Aug 6 00:47:17 GMT 2005


Author: tpot
Date: 2005-08-06 00:47:17 +0000 (Sat, 06 Aug 2005)
New Revision: 9155

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

Log:
Fix ReadEventLog() test so it now works.

Modified:
   branches/SAMBA_4_0/source/torture/rpc/eventlog.c


Changeset:
Modified: branches/SAMBA_4_0/source/torture/rpc/eventlog.c
===================================================================
--- branches/SAMBA_4_0/source/torture/rpc/eventlog.c	2005-08-06 00:46:43 UTC (rev 9154)
+++ branches/SAMBA_4_0/source/torture/rpc/eventlog.c	2005-08-06 00:47:17 UTC (rev 9155)
@@ -2,7 +2,7 @@
    Unix SMB/CIFS implementation.
    test suite for eventlog rpc operations
 
-   Copyright (C) Tim Potter 2003
+   Copyright (C) Tim Potter 2003,2005
    Copyright (C) Jelmer Vernooij 2004
    
    This program is free software; you can redistribute it and/or modify
@@ -59,20 +59,13 @@
 
 	printf("\ntesting ReadEventLog\n");
 
-	r.in.flags = 0x0;
-	r.in.offset = offset;
 	r.in.handle = handle;
-	r.in.number_of_bytes = 0x0;
+	r.in.flags = EVENTLOG_BACKWARDS_READ|EVENTLOG_SEQUENTIAL_READ;
+	r.in.offset = 0;
+	r.in.number_of_bytes = 0;
 
-	r.out.data = talloc(mem_ctx, uint8_t);
-
 	status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 
-	if (!NT_STATUS_IS_OK(status)) {
-		printf("ReadEventLog failed - %s\n", nt_errstr(status));
-		return False;
-	}
-
 	if (NT_STATUS_IS_OK(r.out.result)) {
 		/* No data */
 		return True;
@@ -84,6 +77,7 @@
 	}
 
 	r.in.number_of_bytes = r.out.real_size;
+	r.out.data = talloc_size(mem_ctx, r.in.number_of_bytes);
 
 	status = dcerpc_eventlog_ReadEventLogW(p, mem_ctx, &r);
 



More information about the samba-cvs mailing list