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