| 2444 | } |
| 2445 | |
| 2446 | bool cbm_daemon_runtime_service_stop(cbm_daemon_runtime_service_t *service, uint32_t timeout_ms) { |
| 2447 | if (!service) { |
| 2448 | return false; |
| 2449 | } |
| 2450 | if (cbm_daemon_runtime_service_state(service) == CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 2451 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2452 | } |
| 2453 | runtime_service_begin_stopping(service, timeout_ms, true, "service_stop"); |
| 2454 | runtime_service_interrupt_connections(service); |
| 2455 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2456 | } |
| 2457 | |
| 2458 | bool cbm_daemon_runtime_service_free(cbm_daemon_runtime_service_t *service) { |
| 2459 | if (!service || |