plugin: Remove plugin_request_new and expose plugin_request_send

plugin_request_new did nothing special aside from registering the
request ID with the dispatch code. This duty has now been moved to
plugin_request_send instead, which is also exposed so we can use that
code in plugin_hook.

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker
2019-01-02 16:04:25 +01:00
committed by Rusty Russell
parent b8584a744b
commit a2fa0788fc
2 changed files with 24 additions and 36 deletions

View File

@@ -87,4 +87,10 @@ void clear_plugins(struct plugins *plugins);
void plugins_notify(struct plugins *plugins,
const struct jsonrpc_notification *n TAKES);
/**
* Send a jsonrpc_request to the specified plugin
*/
void plugin_request_send(struct plugin *plugin,
struct jsonrpc_request *req TAKES);
#endif /* LIGHTNING_LIGHTNINGD_PLUGIN_H */