| 2440 | } |
| 2441 | |
| 2442 | bool plugins_anyone_cares(struct plugins *plugins, const char *method) |
| 2443 | { |
| 2444 | struct plugin_subscription_htable_iter it; |
| 2445 | |
| 2446 | if (!plugins) |
| 2447 | return false; |
| 2448 | |
| 2449 | if (plugin_subscription_htable_getfirst(plugins->subscriptions, |
| 2450 | method, &it) != NULL) |
| 2451 | return true; |
| 2452 | |
| 2453 | /* Wildcards cover everything except "log" */ |
| 2454 | if (streq(method, "log")) |
| 2455 | return false; |
| 2456 | return plugin_subscription_htable_getfirst(plugins->subscriptions, |
| 2457 | "*", &it) != NULL; |
| 2458 | } |
| 2459 | |
| 2460 | bool plugin_single_notify(struct plugin *p, |
| 2461 | const struct jsonrpc_notification *n TAKES) |