A command which does async, even if it is a check */
| 177 | |
| 178 | /* A command which does async, even if it is a check */ |
| 179 | static struct command_result *json_checkthis(struct command *cmd, |
| 180 | const char *buf, |
| 181 | const jsmntok_t *params) |
| 182 | { |
| 183 | struct out_req *req; |
| 184 | const jsmntok_t *key; |
| 185 | |
| 186 | /* We are deliberately MORE restrictive than datastore, so we can |
| 187 | * fail here if we want to */ |
| 188 | if (!param_check(cmd, buf, params, |
| 189 | p_opt("key", param_array, &key), |
| 190 | NULL)) |
| 191 | return command_param_failed(); |
| 192 | |
| 193 | req = jsonrpc_request_start(cmd, |
| 194 | "listdatastore", |
| 195 | listdatastore_ok, |
| 196 | forward_error, NULL); |
| 197 | if (key) |
| 198 | json_add_tok(req->js, "key", key, buf); |
| 199 | return send_outreq(req); |
| 200 | } |
| 201 | |
| 202 | static struct command_result *spam_done(struct command *cmd, void *unused) |
| 203 | { |
nothing calls this directly
no test coverage detected