Lines Matching refs:dbi
175 struct dbinfo dbi; in process() local
205 if (state_get(state, &c, &dbi) == -1) in process()
211 "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, in process()
212 fmttime(b1, sizeof(b1), dbi.last), in process()
226 dbi.count = c.c_nfail - 1; in process()
229 dbi.count++; in process()
230 dbi.last = ts.tv_sec; in process()
231 if (c.c_nfail != -1 && dbi.count >= c.c_nfail) { in process()
238 if (dbi.id[0] == '\0') { in process()
240 dbi.id, sizeof(dbi.id)); in process()
252 if (dbi.last == 0) in process()
254 dbi.count = 0; in process()
255 dbi.last = 0; in process()
263 state_put(state, &c, &dbi); in process()
271 "last=%s now=%s", __func__, rbuf, dbi.count, c.c_nfail, in process()
272 fmttime(b1, sizeof(b1), dbi.last), in process()
297 struct dbinfo dbi; in update() local
308 for (n = 0, f = 1; state_iterate(state, &c, &dbi, f) == 1; in update()
311 time_t when = c.c_duration + dbi.last; in update()
316 "last=%s " "now=%s", __func__, n, buf, dbi.count, in update()
317 c.c_duration, fmttime(b1, sizeof(b1), dbi.last), in update()
322 if (dbi.id[0]) { in update()
323 run_change("rem", &c, dbi.id, 0); in update()
399 struct dbinfo dbi; in rules_restore() local
402 for (f = 1; state_iterate(state, &c, &dbi, f) == 1; f = 0) { in rules_restore()
403 if (dbi.id[0] == '\0') in rules_restore()
405 (void)run_change("add", &c, dbi.id, sizeof(dbi.id)); in rules_restore()