| 117 | } |
| 118 | |
| 119 | void json_stream_close(struct json_stream *js, struct command *writer) |
| 120 | { |
| 121 | /* FIXME: We use writer == NULL for malformed: make writer a void *? |
| 122 | * I used to assert(writer); here. */ |
| 123 | assert(js->writer == writer); |
| 124 | |
| 125 | assert(!js->filter); |
| 126 | json_stream_double_cr(js); |
| 127 | json_stream_flush(js); |
| 128 | js->writer = NULL; |
| 129 | } |
| 130 | |
| 131 | /* Also called when we're oom, so it will kill reader. */ |
| 132 | void json_stream_flush(struct json_stream *js) |
no test coverage detected