| 110 | } |
| 111 | |
| 112 | void json_stream_close(struct json_stream *js, struct command *writer) |
| 113 | { |
| 114 | /* FIXME: We use writer == NULL for malformed: make writer a void *? |
| 115 | * I used to assert(writer); here. */ |
| 116 | assert(js->writer == writer); |
| 117 | |
| 118 | /* Should be well-formed at this point! */ |
| 119 | json_stream_double_cr(js); |
| 120 | json_stream_flush(js); |
| 121 | js->writer = NULL; |
| 122 | } |
| 123 | |
| 124 | /* Also called when we're oom, so it will kill reader. */ |
| 125 | void json_stream_flush(struct json_stream *js) |
no test coverage detected