diff options
Diffstat (limited to 'source3/rpc_server')
-rw-r--r-- | source3/rpc_server/srv_eventlog_nt.c | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/source3/rpc_server/srv_eventlog_nt.c b/source3/rpc_server/srv_eventlog_nt.c index d12b490d21..35853c2990 100644 --- a/source3/rpc_server/srv_eventlog_nt.c +++ b/source3/rpc_server/srv_eventlog_nt.c @@ -581,15 +581,17 @@ static Eventlog_entry *read_package_entry( TALLOC_CTX *mem_ctx, /******************************************************************** ********************************************************************/ -static bool add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u, +static bool add_record_to_resp( Eventlog_entry *entry, + uint32_t *num_records, + uint32_t *num_bytes_in_resp, Eventlog_entry * ee_new ) { Eventlog_entry *insert_point; - insert_point = r_u->entry; + insert_point = entry; if ( NULL == insert_point ) { - r_u->entry = ee_new; + entry = ee_new; ee_new->next = NULL; } else { while ( ( NULL != insert_point->next ) ) { @@ -598,8 +600,8 @@ static bool add_record_to_resp( EVENTLOG_R_READ_EVENTLOG * r_u, ee_new->next = NULL; insert_point->next = ee_new; } - r_u->num_records++; - r_u->num_bytes_in_resp += ee_new->record.length; + (*num_records)++; + *num_bytes_in_resp += ee_new->record.length; return True; } @@ -780,7 +782,10 @@ NTSTATUS _eventlog_read_eventlog( pipes_struct * p, break; } - add_record_to_resp( r_u, ee_new ); + add_record_to_resp( r_u->entry, + &r_u->num_records, &r_u->num_bytes_in_resp, + ee_new ); + bytes_left -= ee_new->record.length; TALLOC_FREE(entry); num_records_read = r_u->num_records - num_records_read; |