| 684 | } |
| 685 | |
| 686 | struct json_stream *json_stream_raw_for_cmd(struct command *cmd) |
| 687 | { |
| 688 | struct json_stream *js; |
| 689 | |
| 690 | /* Might have already opened it for a notification */ |
| 691 | if (cmd->json_stream) |
| 692 | return cmd->json_stream; |
| 693 | |
| 694 | /* If they still care about the result, attach it to them. */ |
| 695 | if (cmd->jcon) |
| 696 | js = jcon_new_json_stream(cmd, cmd->jcon, cmd); |
| 697 | else |
| 698 | js = new_json_stream(cmd, cmd, NULL); |
| 699 | |
| 700 | assert(!cmd->json_stream); |
| 701 | cmd->json_stream = js; |
| 702 | return js; |
| 703 | } |
| 704 | |
| 705 | void json_stream_log_suppress_for_cmd(struct json_stream *js, |
| 706 | const struct command *cmd) |
no test coverage detected