mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-03 22:34:21 +01:00
lightningd/plugin: Add a 'configured' member to the plugin struct, split 'plugins_init'
This adds a 'configured' boolean member to the plugin struct so that we can add plugins to ld->plugins' list and differenciate fresh plugins. This also adds 'plugins_start' so that new plugins can be started without calling 'plugins_init' and running an io loop
This commit is contained in:
@@ -20,6 +20,7 @@ struct plugin {
|
||||
bool stop;
|
||||
struct plugins *plugins;
|
||||
const char **plugin_path;
|
||||
bool configured;
|
||||
|
||||
/* Stuff we read */
|
||||
char *buffer;
|
||||
@@ -53,6 +54,7 @@ struct plugin {
|
||||
struct plugins {
|
||||
struct list_head plugins;
|
||||
size_t pending_manifests;
|
||||
bool startup;
|
||||
|
||||
/* Currently pending requests by their request ID */
|
||||
UINTMAP(struct jsonrpc_request *) pending_requests;
|
||||
@@ -96,6 +98,8 @@ struct plugins *plugins_new(const tal_t *ctx, struct log_book *log_book,
|
||||
*/
|
||||
void plugins_add_default_dir(struct plugins *plugins, const char *default_dir);
|
||||
|
||||
void plugins_start(struct plugins *plugins, const char *dev_plugin_debug);
|
||||
|
||||
/**
|
||||
* Initialize the registered plugins.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user