}
static void
-flush_trie(struct aggregator_proto *p)
+flush_aggregator(struct aggregator_proto *p)
{
lp_flush(p->bucket_pool);
lp_flush(p->route_pool);
if (C == p->src)
{
run_aggregation(p);
- flush_trie(p);
+ flush_aggregator(p);
p->root = NULL;
if (p->first_run)
}
assert(p->root != NULL);
- settle_kick(&p->aggr_timer);
+ settle_kick(&p->notify_settle);
}
static int
p->aggr_on = cf->aggr_on;
p->net_present = cf->net_present;
p->merge_by = cf->merge_by;
- p->aggr_timer_cf = cf->aggr_timer_cf;
+ p->notify_settle_cf = cf->notify_settle_cf;
P->rt_notify = aggregator_rt_notify;
P->preexport = aggregator_preexport;
p->first_run = 1;
p->aggr_done = 0;
- settle_init(&p->aggr_timer, &p->aggr_timer_cf, aggregate_on_settle_timer, p);
+ settle_init(&p->notify_settle, &p->notify_settle_cf, aggregate_on_settle_timer, p);
return PS_UP;
}
}
HASH_WALK_END;
- settle_cancel(&p->aggr_timer);
+ settle_cancel(&p->notify_settle);
assert(p->root != NULL);
p->root = NULL;
TRACE(D_EVENTS, "Reconfiguring");
/* Compare timer configuration */
- if (cf->aggr_timer_cf.min != p->aggr_timer_cf.min || cf->aggr_timer_cf.max != p->aggr_timer_cf.max)
+ if (cf->notify_settle_cf.min != p->notify_settle_cf.min || cf->notify_settle_cf.max != p->notify_settle_cf.max)
return 0;
/* Compare numeric values (shortcut) */
struct aggr_item *aggr_on;
int net_present;
const struct f_line *merge_by;
- struct settle_config aggr_timer_cf;
+ struct settle_config notify_settle_cf;
};
struct aggregator_route {
uint addr_type;
linpool *trie_pool;
struct trie_node *root;
- struct settle_config aggr_timer_cf;
- struct settle aggr_timer;
+ struct settle_config notify_settle_cf;
+ struct settle notify_settle;
int before_count;
int after_count;
int aggr_done;
AGGREGATOR_CFG->dst = channel_config_new(NULL, "destination", 0, this_proto);
AGGREGATOR_CFG->src->ra_mode = AGGREGATOR_CFG->dst->ra_mode = RA_ANY;
- AGGREGATOR_CFG->aggr_timer_cf = (struct settle_config) {
+ AGGREGATOR_CFG->notify_settle_cf = (struct settle_config) {
.min = 10 MS_,
.max = 100 MS_,
};
$4->args++;
AGGREGATOR_CFG->merge_by = $4;
}
- | RELOAD AFTER settle { AGGREGATOR_CFG->aggr_timer_cf = $3; }
+ | RELOAD AFTER settle { AGGREGATOR_CFG->notify_settle_cf = $3; }
;
aggregator_proto_opts: /* empty */ | aggregator_proto_opts aggregator_proto_item ';' ;