Report updates on existing samplers in v9 only if values change. issue 84

This commit is contained in:
Peter Haag 2017-12-17 19:12:00 +01:00
parent 79d9916c64
commit 959edbcc18
2 changed files with 3 additions and 2 deletions

View File

@ -1,5 +1,6 @@
2017-12-17 2017-12-17
- Add ipfix sampling. Process option template/record with sampling elements 34 and 35 - Add ipfix sampling. Process option template/record with sampling elements 34 and 35
- Report updates on existing samplers in v9 only if values change. issue 84
2017-12-10 2017-12-10
- Add lz4 compression - Add lz4 compression

View File

@ -3013,8 +3013,6 @@ generic_sampler_t *sampler;
// test for update of existing sampler // test for update of existing sampler
if ( sampler->info.id == id ) { if ( sampler->info.id == id ) {
// found same sampler id - update record // found same sampler id - update record
LogInfo( "Update existing sampler id: %i, mode: %u, interval: %u\n",
id, mode, interval);
dbg_printf("Update existing sampler id: %i, mode: %u, interval: %u\n", dbg_printf("Update existing sampler id: %i, mode: %u, interval: %u\n",
id, mode, interval); id, mode, interval);
@ -3023,6 +3021,8 @@ generic_sampler_t *sampler;
FlushInfoSampler(fs, &(sampler->info)); FlushInfoSampler(fs, &(sampler->info));
sampler->info.mode = mode; sampler->info.mode = mode;
sampler->info.interval = interval; sampler->info.interval = interval;
LogInfo( "Update existing sampler id: %i, mode: %u, interval: %u\n",
id, mode, interval);
} else { } else {
dbg_printf("Sampler unchanged!\n"); dbg_printf("Sampler unchanged!\n");
} }