MCPcopy Create free account
hub / github.com/ElementsProject/lightning / plugin_manifest_cb

Function plugin_manifest_cb

lightningd/plugin.c:1827–1854  ·  view source on GitHub ↗

* Callback for the plugin_manifest request. */

Source from the content-addressed store, hash-verified

1825 * Callback for the plugin_manifest request.
1826 */
1827static void plugin_manifest_cb(const char *buffer,
1828 const jsmntok_t *toks,
1829 const jsmntok_t *idtok,
1830 struct plugin *plugin)
1831{
1832 const char *err, *disabled;
1833 err = plugin_parse_getmanifest_response(buffer, toks, idtok, plugin, &disabled);
1834
1835 if (err) {
1836 plugin_kill(plugin, LOG_UNUSUAL, "%s", err);
1837 return;
1838 }
1839
1840 if (disabled) {
1841 plugin_kill(plugin, LOG_INFORM,
1842 "disabled itself: %s", disabled);
1843 return;
1844 }
1845
1846 /* Reset timer, it'd kill us otherwise. */
1847 plugin->timeout_timer = tal_free(plugin->timeout_timer);
1848
1849 if (!plugin->plugins->startup && !plugin->dynamic)
1850 plugin_kill(plugin, LOG_INFORM,
1851 "Not a dynamic plugin");
1852 else
1853 check_plugins_manifests(plugin->plugins, plugin->log);
1854}
1855
1856/* If this is a valid plugin return full path name, otherwise NULL */
1857static const char *plugin_fullpath(const tal_t *ctx, const char *dir,

Callers

nothing calls this directly

Calls 4

plugin_killFunction · 0.85
tal_freeFunction · 0.85
check_plugins_manifestsFunction · 0.85

Tested by

no test coverage detected