| 969 | }; |
| 970 | |
| 971 | static bool |
| 972 | recover_hook_deserialize(struct recover_payload *payload, |
| 973 | const char *buffer, const jsmntok_t *toks) |
| 974 | { |
| 975 | const jsmntok_t *t_res; |
| 976 | |
| 977 | if (!toks || !buffer) |
| 978 | return true; |
| 979 | |
| 980 | t_res = json_get_member(buffer, toks, "result"); |
| 981 | |
| 982 | /* fail */ |
| 983 | if (!t_res || !json_tok_streq(buffer, t_res, "continue")) |
| 984 | fatal("Plugin returned an invalid response to the " |
| 985 | "recover hook: %s", buffer); |
| 986 | |
| 987 | /* call next hook */ |
| 988 | return true; |
| 989 | } |
| 990 | |
| 991 | static void recover_hook_final(struct recover_payload *payload STEALS) |
| 992 | { |
nothing calls this directly
no test coverage detected