| 624 | }; |
| 625 | |
| 626 | static struct command_result *send_more_cmd(struct command *cmd, |
| 627 | const char *buf UNUSED, |
| 628 | const jsmntok_t *result UNUSED, |
| 629 | struct outgoing *outgoing) |
| 630 | { |
| 631 | struct out_req *req; |
| 632 | |
| 633 | if (outgoing->msg_off == tal_count(outgoing->msgs)) { |
| 634 | tal_free(outgoing); |
| 635 | return command_still_pending(cmd); |
| 636 | } |
| 637 | |
| 638 | req = jsonrpc_request_start(plugin, cmd, "sendcustommsg", |
| 639 | send_more_cmd, forward_error, outgoing); |
| 640 | json_add_node_id(req->js, "node_id", &outgoing->peer); |
| 641 | json_add_hex_talarr(req->js, "msg", outgoing->msgs[outgoing->msg_off++]); |
| 642 | |
| 643 | return send_outreq(plugin, req); |
| 644 | } |
| 645 | |
| 646 | static struct command_result *json_commando(struct command *cmd, |
| 647 | const char *buffer, |
no test coverage detected