summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-01-24 02:59:24 +0100
committerGünther Deschner <gd@samba.org>2009-01-24 03:00:38 +0100
commit5bcd6d760b628832a43271293bee207819784001 (patch)
tree44ef45f538e46180e4a1191bcdcfa9496c85ce5e
parentdd2695fe52374cb72bf0954805ff614eef640eae (diff)
downloadsamba-5bcd6d760b628832a43271293bee207819784001.tar.gz
samba-5bcd6d760b628832a43271293bee207819784001.tar.bz2
samba-5bcd6d760b628832a43271293bee207819784001.zip
Revert "s3-eventlog: trying to avoid to pass around full ndr structures in rpc_server."
This reverts commit c0f1309010b79be67557af5ffbd1c429a3f3d99a.
-rw-r--r--source3/rpc_server/srv_eventlog_nt.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c
index 5b98ea54f4..5f9df1ba81 100644
--- a/source3/rpc_server/srv_eventlog_nt.c
+++ b/source3/rpc_server/srv_eventlog_nt.c
@@ -578,17 +578,15 @@ static Eventlog_entry *read_package_entry( TALLOC_CTX *mem_ctx,
/********************************************************************
********************************************************************/
-static bool add_record_to_resp( Eventlog_entry *entry,
- uint32_t *num_records,
- uint32_t *num_bytes_in_resp,
+static bool add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u,
Eventlog_entry * ee_new )
{
Eventlog_entry *insert_point;
- insert_point = entry;
+ insert_point = r_u->entry;
if ( NULL == insert_point ) {
- entry = ee_new;
+ r_u->entry = ee_new;
ee_new->next = NULL;
} else {
while ( ( NULL != insert_point->next ) ) {
@@ -597,8 +595,8 @@ static bool add_record_to_resp( Eventlog_entry *entry,
ee_new->next = NULL;
insert_point->next = ee_new;
}
- (*num_records)++;
- *num_bytes_in_resp += ee_new->record.length;
+ r_u->num_records++;
+ r_u->num_bytes_in_resp += ee_new->record.length;
return True;
}
@@ -775,10 +773,7 @@ NTSTATUS _eventlog_read_eventlog( pipes_struct * p,
break;
}
- add_record_to_resp( r_u->entry,
- &r_u->num_records, &r_u->num_bytes_in_resp,
- ee_new );
-
+ add_record_to_resp( r_u, ee_new );
bytes_left -= ee_new->record.length;
TALLOC_FREE(entry);
num_records_read = r_u->num_records - num_records_read;