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

Function plugin_manifest_cb

lightningd/plugin.c:1551–1578  ·  view source on GitHub ↗

* Callback for the plugin_manifest request. */

Source from the content-addressed store, hash-verified

1549 * Callback for the plugin_manifest request.
1550 */
1551static void plugin_manifest_cb(const char *buffer,
1552 const jsmntok_t *toks,
1553 const jsmntok_t *idtok,
1554 struct plugin *plugin)
1555{
1556 const char *err, *disabled;
1557 err = plugin_parse_getmanifest_response(buffer, toks, idtok, plugin, &disabled);
1558
1559 if (err) {
1560 plugin_kill(plugin, LOG_UNUSUAL, "%s", err);
1561 return;
1562 }
1563
1564 if (disabled) {
1565 plugin_kill(plugin, LOG_DBG,
1566 "disabled itself: %s", disabled);
1567 return;
1568 }
1569
1570 /* Reset timer, it'd kill us otherwise. */
1571 plugin->timeout_timer = tal_free(plugin->timeout_timer);
1572
1573 if (!plugin->plugins->startup && !plugin->dynamic)
1574 plugin_kill(plugin, LOG_INFORM,
1575 "Not a dynamic plugin");
1576 else
1577 check_plugins_manifests(plugin->plugins);
1578}
1579
1580/* If this is a valid plugin return full path name, otherwise NULL */
1581static 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