| 345 | } |
| 346 | |
| 347 | static struct command_result *checkrune_failed(struct command *cmd, |
| 348 | const char *method, |
| 349 | const char *buf, |
| 350 | const jsmntok_t *result, |
| 351 | struct cond_info *cinfo) |
| 352 | { |
| 353 | const jsmntok_t *msg = json_get_member(buf, result, "message"); |
| 354 | |
| 355 | if (!msg) { |
| 356 | plugin_err(plugin, "Invalid checkrune error %.*s", |
| 357 | json_tok_full_len(result), |
| 358 | json_tok_full(buf, result)); |
| 359 | } |
| 360 | |
| 361 | return commando_error(cmd, cinfo->incoming, |
| 362 | COMMANDO_ERROR_REMOTE_AUTH, |
| 363 | "Invalid rune: %.*s", |
| 364 | msg->end - msg->start, buf + msg->start); |
| 365 | } |
| 366 | |
| 367 | static struct command_result *try_command(struct command *cmd, |
| 368 | struct commando *incoming STEALS) |
nothing calls this directly
no test coverage detected