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

Function plugin_manifest_cb

lightningd/plugin.c:1815–1842  ·  view source on GitHub ↗

* Callback for the plugin_manifest request. */

Source from the content-addressed store, hash-verified

1813 * Callback for the plugin_manifest request.
1814 */
1815static void plugin_manifest_cb(const char *buffer,
1816 const jsmntok_t *toks,
1817 const jsmntok_t *idtok,
1818 struct plugin *plugin)
1819{
1820 const char *err, *disabled;
1821 err = plugin_parse_getmanifest_response(buffer, toks, idtok, plugin, &disabled);
1822
1823 if (err) {
1824 plugin_kill(plugin, LOG_UNUSUAL, "%s", err);
1825 return;
1826 }
1827
1828 if (disabled) {
1829 plugin_kill(plugin, LOG_INFORM,
1830 "disabled itself: %s", disabled);
1831 return;
1832 }
1833
1834 /* Reset timer, it'd kill us otherwise. */
1835 plugin->timeout_timer = tal_free(plugin->timeout_timer);
1836
1837 if (!plugin->plugins->startup && !plugin->dynamic)
1838 plugin_kill(plugin, LOG_INFORM,
1839 "Not a dynamic plugin");
1840 else
1841 check_plugins_manifests(plugin->plugins, plugin->log);
1842}
1843
1844/* If this is a valid plugin return full path name, otherwise NULL */
1845static 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