| 2945 | AUTODATA(json_command, &listforwards_command); |
| 2946 | |
| 2947 | static struct command_result *param_forward_delstatus(struct command *cmd, |
| 2948 | const char *name, |
| 2949 | const char *buffer, |
| 2950 | const jsmntok_t *tok, |
| 2951 | enum forward_status **status) |
| 2952 | { |
| 2953 | struct command_result *ret; |
| 2954 | |
| 2955 | ret = param_forward_status(cmd, name, buffer, tok, status); |
| 2956 | if (ret) |
| 2957 | return ret; |
| 2958 | |
| 2959 | switch (**status) { |
| 2960 | case FORWARD_OFFERED: |
| 2961 | return command_fail_badparam(cmd, name, buffer, tok, |
| 2962 | "delforward status cannot be offered"); |
| 2963 | case FORWARD_ANY: |
| 2964 | return command_fail_badparam(cmd, name, buffer, tok, |
| 2965 | "delforward status cannot be any"); |
| 2966 | case FORWARD_SETTLED: |
| 2967 | case FORWARD_FAILED: |
| 2968 | case FORWARD_LOCAL_FAILED: |
| 2969 | return NULL; |
| 2970 | } |
| 2971 | abort(); |
| 2972 | } |
| 2973 | |
| 2974 | static struct command_result *json_delforward(struct command *cmd, |
| 2975 | const char *buffer, |
nothing calls this directly
no test coverage detected