*subset = th_getsubsetbyhost(ip, mask);
}
-void trusts_flush(void) {
+void trusts_flush(void (*thflush)(trusthost *), void (*tgflush)(trustgroup *)) {
trustgroup *tg;
trusthost *th;
time_t t = time(NULL);
if(tg->count > 0)
tg->lastseen = t;
- tg_dbupdatecounts(tg);
+ tgflush(tg);
for(th=tg->hosts;th;th=th->next) {
if(th->count > 0)
th->lastseen = t;
- th_dbupdatecounts(th);
+ thflush(th);
}
}
}