| 1391 | } |
| 1392 | |
| 1393 | void jsonrpc_request_end(struct jsonrpc_request *r) |
| 1394 | { |
| 1395 | json_object_end(r->stream); /* closes '.params' */ |
| 1396 | json_object_end(r->stream); /* closes '.' */ |
| 1397 | |
| 1398 | /* We guarantee to have \n\n at end of each response. */ |
| 1399 | json_stream_append(r->stream, "\n\n", strlen("\n\n")); |
| 1400 | } |
| 1401 | |
| 1402 | /* We add this destructor as a canary to detect cmd failing. */ |
| 1403 | static void destroy_command_canary(struct command *cmd, bool *failed) |
no test coverage detected