| 225 | } |
| 226 | |
| 227 | static void hook_done(struct lightningd *ld, |
| 228 | struct plugin_hook *hook, |
| 229 | void *cb_arg) |
| 230 | { |
| 231 | /* If we're the last one out, we can update hooks */ |
| 232 | if (--hook->num_users == 0) { |
| 233 | if (hook->new_hooks) { |
| 234 | log_unusual(ld->log, "Updating hooks for %s now usage is done.", |
| 235 | hook->name); |
| 236 | /* Free this later (after final_cb) if not already done */ |
| 237 | tal_steal(tmpctx, hook->hooks); |
| 238 | hook->hooks = hook->new_hooks; |
| 239 | hook->new_hooks = NULL; |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | hook->final_cb(cb_arg); |
| 244 | } |
| 245 | |
| 246 | |
| 247 | /** |
no outgoing calls
no test coverage detected