Ignore the result, and terminate the timer/aux/hook */
| 284 | |
| 285 | /* Ignore the result, and terminate the timer/aux/hook */ |
| 286 | struct command_result *ignore_and_complete(struct command *cmd, |
| 287 | const char *method, |
| 288 | const char *buf, |
| 289 | const jsmntok_t *result, |
| 290 | void *arg) |
| 291 | { |
| 292 | switch (cmd->type) { |
| 293 | case COMMAND_TYPE_NORMAL: |
| 294 | case COMMAND_TYPE_CHECK: |
| 295 | case COMMAND_TYPE_USAGE_ONLY: |
| 296 | plugin_err(cmd->plugin, |
| 297 | "%s: cannot ignore_and_complete type %u", |
| 298 | method, cmd->type); |
| 299 | case COMMAND_TYPE_HOOK: |
| 300 | return command_hook_success(cmd); |
| 301 | /* Terminate with aux_command_done */ |
| 302 | case COMMAND_TYPE_AUX: |
| 303 | return aux_command_done(cmd); |
| 304 | case COMMAND_TYPE_NOTIFICATION: |
| 305 | return notification_handled(cmd); |
| 306 | case COMMAND_TYPE_TIMER: |
| 307 | return timer_complete(cmd); |
| 308 | } |
| 309 | abort(); |
| 310 | } |
| 311 | |
| 312 | /* Broken the result, and terminate the command */ |
| 313 | struct command_result *log_broken_and_complete(struct command *cmd, |
no test coverage detected