plugins: update for new deprecation API where all fields are nicely wrapped.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2023-07-07 11:42:26 +09:30
parent 4e5e38f4b0
commit 99b885c84c
2 changed files with 6 additions and 2 deletions

View File

@@ -78,7 +78,11 @@ static struct command_result *json_connected(struct command *cmd,
const char *buf,
const jsmntok_t *params)
{
const jsmntok_t *idtok = json_get_member(buf, params, "id");
const jsmntok_t *connecttok, *idtok;
connecttok = json_get_member(buf, params, "connect");
assert(connecttok);
idtok = json_get_member(buf, connecttok, "id");
assert(idtok);
plugin_log(cmd->plugin, LOG_INFORM, "%s connected",
json_strdup(tmpctx, buf, idtok));