Every minute we forget entries. */
| 69 | |
| 70 | /* Every minute we forget entries. */ |
| 71 | static void flush_usage_table(void *unused) |
| 72 | { |
| 73 | struct usage *u; |
| 74 | struct usage_table_iter it; |
| 75 | |
| 76 | for (u = usage_table_first(&usage_table, &it); |
| 77 | u; |
| 78 | u = usage_table_next(&usage_table, &it)) { |
| 79 | usage_table_delval(&usage_table, &it); |
| 80 | tal_free(u); |
| 81 | } |
| 82 | |
| 83 | notleak(plugin_timer(plugin, time_from_sec(60), flush_usage_table, NULL)); |
| 84 | } |
| 85 | |
| 86 | /* NULL peer: don't care about peer. NULL id: don't care about id */ |
| 87 | static struct commando *find_commando(struct commando **arr, |
no test coverage detected