| 235 | AUTODATA(json_command, &listforwards_command); |
| 236 | |
| 237 | static struct command_result *param_forward_delstatus(struct command *cmd, |
| 238 | const char *name, |
| 239 | const char *buffer, |
| 240 | const jsmntok_t *tok, |
| 241 | enum forward_status **status) |
| 242 | { |
| 243 | struct command_result *ret; |
| 244 | |
| 245 | ret = param_forward_status(cmd, name, buffer, tok, status); |
| 246 | if (ret) |
| 247 | return ret; |
| 248 | |
| 249 | switch (**status) { |
| 250 | case FORWARD_OFFERED: |
| 251 | return command_fail_badparam(cmd, name, buffer, tok, |
| 252 | "delforward status cannot be offered"); |
| 253 | case FORWARD_ANY: |
| 254 | return command_fail_badparam(cmd, name, buffer, tok, |
| 255 | "delforward status cannot be any"); |
| 256 | case FORWARD_SETTLED: |
| 257 | case FORWARD_FAILED: |
| 258 | case FORWARD_LOCAL_FAILED: |
| 259 | return NULL; |
| 260 | } |
| 261 | abort(); |
| 262 | } |
| 263 | |
| 264 | static struct command_result *json_delforward(struct command *cmd, |
| 265 | const char *buffer, |
nothing calls this directly
no test coverage detected