svn commit: samba r9890 - in trunk/source/rpc_server: .
jerry at samba.org
jerry at samba.org
Thu Sep 1 11:24:32 GMT 2005
Author: jerry
Date: 2005-09-01 11:24:31 +0000 (Thu, 01 Sep 2005)
New Revision: 9890
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=9890
Log:
Patch from Marcin:
> This fixes a corruption issue caused by the fact that I was not honoring
> the offset into the eventlog that eventvwr was passing me -- I was
> keeping state of my own offset. Turns out that eventvwr does a little
> bit of jumping around and skipping some records -- not sure why or how,
> but it does -- and if such skipping around happens, then my keeping
> state of the offset internally does not work.
Modified:
trunk/source/rpc_server/srv_eventlog_nt.c
Changeset:
Modified: trunk/source/rpc_server/srv_eventlog_nt.c
===================================================================
--- trunk/source/rpc_server/srv_eventlog_nt.c 2005-09-01 11:22:13 UTC (rev 9889)
+++ trunk/source/rpc_server/srv_eventlog_nt.c 2005-09-01 11:24:31 UTC (rev 9890)
@@ -29,7 +29,6 @@
fstring handle_string;
uint32 num_records;
uint32 oldest_entry;
- uint32 active_entry;
uint32 flags;
} EventlogInfo;
@@ -939,26 +938,12 @@
info->flags = q_u->flags;
ps = &p->out_data.rdata;
- /* if this is the first time we're reading on this handle */
-
- if ( info->active_entry == 0 ) {
-
- /* Rather than checking the EVENTLOG_SEQUENTIAL_READ/EVENTLOG_SEEK_READ flags,
- we'll just go to the offset specified in the request, or the oldest entry
- if no offset is specified */
-
- if(q_u->offset > 0)
- info->active_entry = q_u->offset;
- else
- info->active_entry = info->oldest_entry;
- }
-
if ( info->flags & EVENTLOG_FORWARDS_READ )
direction = "forward";
else if ( info->flags & EVENTLOG_BACKWARDS_READ )
direction = "backward";
- if ( !(read_eventlog_hook(info, &entry, direction, info->active_entry, q_u->max_read_size, &eof, &buffer, &numlines)) ) {
+ if ( !(read_eventlog_hook(info, &entry, direction, q_u->offset, q_u->max_read_size, &eof, &buffer, &numlines)) ) {
if(eof == False) {
return WERR_NOMEM;
}
@@ -991,12 +976,6 @@
r_u->num_records,
r_u->num_bytes_in_resp,
q_u->max_read_size));
- /* update the active record */
- if(info->flags & EVENTLOG_FORWARDS_READ) {
- info->active_entry += num_records_read;
- } else if(info->flags & EVENTLOG_BACKWARDS_READ) {
- info->active_entry -= num_records_read;
- }
}
}
SAFE_FREE(buffer);
More information about the samba-cvs
mailing list