| 555 | } |
| 556 | |
| 557 | struct json_stream *json_stream_raw_for_cmd(struct command *cmd) |
| 558 | { |
| 559 | struct json_stream *js; |
| 560 | |
| 561 | /* Might have already opened it for a notification */ |
| 562 | if (cmd->json_stream) |
| 563 | return cmd->json_stream; |
| 564 | |
| 565 | /* If they still care about the result, attach it to them. */ |
| 566 | if (cmd->jcon) |
| 567 | js = jcon_new_json_stream(cmd, cmd->jcon, cmd); |
| 568 | else |
| 569 | js = new_json_stream(cmd, cmd, NULL); |
| 570 | |
| 571 | assert(!cmd->json_stream); |
| 572 | cmd->json_stream = js; |
| 573 | return js; |
| 574 | } |
| 575 | |
| 576 | void json_stream_log_suppress_for_cmd(struct json_stream *js, |
| 577 | const struct command *cmd) |
no test coverage detected