mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-23 15:00:34 +01:00
libplugin: add no-op command complete function
When an RPC originates from a plugin, and there's no associated command, it's useful to be able to signal that you're finished.
This commit is contained in:
parent
7bc78c45b4
commit
15e83925e8
2 changed files with 8 additions and 0 deletions
|
@ -106,6 +106,10 @@ struct command_result *command_param_failed(void)
|
||||||
return &complete;
|
return &complete;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct command_result *command_done(void)
|
||||||
|
{
|
||||||
|
return &complete;
|
||||||
|
}
|
||||||
|
|
||||||
static void ld_send(struct plugin *plugin, struct json_stream *stream)
|
static void ld_send(struct plugin *plugin, struct json_stream *stream)
|
||||||
{
|
{
|
||||||
|
|
|
@ -219,6 +219,10 @@ struct command_result *forward_result(struct command *cmd,
|
||||||
* send_req() path. */
|
* send_req() path. */
|
||||||
struct command_result *timer_complete(struct plugin *p);
|
struct command_result *timer_complete(struct plugin *p);
|
||||||
|
|
||||||
|
/* Signals that we've completed a command. Useful for when
|
||||||
|
* there's no `cmd` present */
|
||||||
|
struct command_result *command_done(void);
|
||||||
|
|
||||||
/* Access timer infrastructure to add a timer.
|
/* Access timer infrastructure to add a timer.
|
||||||
*
|
*
|
||||||
* Freeing this releases the timer, otherwise it's freed after @cb
|
* Freeing this releases the timer, otherwise it's freed after @cb
|
||||||
|
|
Loading…
Add table
Reference in a new issue