| 1803 | } |
| 1804 | |
| 1805 | static void plugin_config_cb(const char *buffer, |
| 1806 | const jsmntok_t *toks, |
| 1807 | const jsmntok_t *idtok, |
| 1808 | struct plugin *plugin) |
| 1809 | { |
| 1810 | const char *disable; |
| 1811 | |
| 1812 | /* Plugin can also disable itself at this stage. */ |
| 1813 | if (json_scan(tmpctx, buffer, toks, "{result:{disable:%}}", |
| 1814 | JSON_SCAN_TAL(tmpctx, json_strdup, &disable)) == NULL) { |
| 1815 | /* Don't get upset if this was a built-in! */ |
| 1816 | plugin->important = false; |
| 1817 | plugin_kill(plugin, LOG_DBG, |
| 1818 | "disabled itself at init: %s", |
| 1819 | disable); |
| 1820 | return; |
| 1821 | } |
| 1822 | |
| 1823 | plugin->plugin_state = INIT_COMPLETE; |
| 1824 | plugin->timeout_timer = tal_free(plugin->timeout_timer); |
| 1825 | if (plugin->start_cmd) { |
| 1826 | plugin_cmd_succeeded(plugin->start_cmd, plugin); |
| 1827 | plugin->start_cmd = NULL; |
| 1828 | } |
| 1829 | check_plugins_initted(plugin->plugins); |
| 1830 | } |
| 1831 | |
| 1832 | static void json_add_plugin_opt(struct json_stream *stream, |
| 1833 | const char *name, |
nothing calls this directly
no test coverage detected