diff options
author | Jeremy Allison <jra@samba.org> | 2006-06-28 21:38:43 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 11:19:06 -0500 |
commit | 68e4fc80668d3c0147536888cb40d0336dd832e5 (patch) | |
tree | 453d50342ced50fcbaa7bb9d547534f0d1d1fd78 /source3/registry | |
parent | e5f766aac82dee8474d66580626033b6018c4108 (diff) | |
download | samba-68e4fc80668d3c0147536888cb40d0336dd832e5.tar.gz samba-68e4fc80668d3c0147536888cb40d0336dd832e5.tar.bz2 samba-68e4fc80668d3c0147536888cb40d0336dd832e5.zip |
r16650: Fix bug #3890 reported by jason@ncac.gwu.edu.
Jeremy.
(This used to be commit 590b58cb507e5a6e459ff0c975beb9056336f233)
Diffstat (limited to 'source3/registry')
-rw-r--r-- | source3/registry/reg_perfcount.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source3/registry/reg_perfcount.c b/source3/registry/reg_perfcount.c index 5b5489739f..a0edf4513f 100644 --- a/source3/registry/reg_perfcount.c +++ b/source3/registry/reg_perfcount.c @@ -1031,10 +1031,10 @@ uint32 reg_perfcount_get_perf_data_block(uint32 base_index, PERF_DATA_BLOCK *block, char *object_ids) { - uint32 buffer_size = 0, last_counter; + uint32 buffer_size = 0; const char *fname = counters_directory( NAMES_DB ); TDB_CONTEXT *names; - int retval; + int retval = 0; names = tdb_open_log(fname, 0, TDB_DEFAULT, O_RDONLY, 0444); @@ -1050,7 +1050,7 @@ uint32 reg_perfcount_get_perf_data_block(uint32 base_index, return 0; } - last_counter = reg_perfcount_get_last_counter(base_index); + reg_perfcount_get_last_counter(base_index); if(object_ids == NULL) { @@ -1066,6 +1066,10 @@ uint32 reg_perfcount_get_perf_data_block(uint32 base_index, tdb_close(names); + if (retval == -1) { + return 0; + } + return buffer_size + block->HeaderLength; } |