| 200 | PRINTF_FMT(3,4); |
| 201 | |
| 202 | static void commando_error(struct commando *incoming, |
| 203 | int ecode, |
| 204 | const char *fmt, ...) |
| 205 | { |
| 206 | struct reply *reply = tal(plugin, struct reply); |
| 207 | va_list ap; |
| 208 | |
| 209 | reply->incoming = tal_steal(reply, incoming); |
| 210 | reply->buf = tal_fmt(reply, "{\"error\":{\"code\":%i,\"message\":\"", ecode); |
| 211 | va_start(ap, fmt); |
| 212 | tal_append_vfmt(&reply->buf, fmt, ap); |
| 213 | va_end(ap); |
| 214 | tal_append_fmt(&reply->buf, "\"}}"); |
| 215 | reply->off = 0; |
| 216 | reply->len = tal_bytelen(reply->buf) - 1; |
| 217 | |
| 218 | send_response(NULL, NULL, NULL, reply); |
| 219 | } |
| 220 | |
| 221 | struct cond_info { |
| 222 | const struct node_id *peer; |
no test coverage detected