plugin: Move list of notification topics to each plugin

We want to ensure that plugins register their topics before sending
any notification, so we need to remember which plugin registered which
topics.
This commit is contained in:
Christian Decker
2021-04-28 16:18:40 +02:00
committed by Rusty Russell
parent c8c2c33952
commit 2e27e4e443
3 changed files with 14 additions and 12 deletions

View File

@@ -93,6 +93,10 @@ struct plugin {
/* Parameters for dynamically-started plugins. */
const char *parambuf;
const jsmntok_t *params;
/* Notification topics that this plugin has registered with us
* and that other plugins may subscribe to. */
const char **notification_topics;
};
/**
@@ -128,10 +132,6 @@ struct plugins {
/* Whether builtin plugins should be overridden as unimportant. */
bool dev_builtin_plugins_unimportant;
#endif /* DEVELOPER */
/* Notification topics that plugins have registered with us
* and that other plugins may subscribe to. */
const char **notification_topics;
};
/* The value of a plugin option, which can have different types.