| 151 | } |
| 152 | |
| 153 | static bool main_local_command_cancel(void *opaque) { |
| 154 | main_local_maintenance_context_t *context = opaque; |
| 155 | if (!context) { |
| 156 | return false; |
| 157 | } |
| 158 | cbm_mutex_lock(&context->mutex); |
| 159 | bool cancelled = context->server && cbm_mcp_server_cancel_active(context->server); |
| 160 | context->maintenance_cancelled = context->maintenance_cancelled || cancelled; |
| 161 | cbm_mutex_unlock(&context->mutex); |
| 162 | return cancelled; |
| 163 | } |
| 164 | |
| 165 | static bool main_local_maintenance_was_cancelled(main_local_maintenance_context_t *context) { |
| 166 | if (!context) { |
nothing calls this directly
no test coverage detected