| 2475 | } |
| 2476 | |
| 2477 | bool cbm_daemon_runtime_service_stop(cbm_daemon_runtime_service_t *service, uint32_t timeout_ms) { |
| 2478 | if (!service) { |
| 2479 | return false; |
| 2480 | } |
| 2481 | if (cbm_daemon_runtime_service_state(service) == CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 2482 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2483 | } |
| 2484 | runtime_service_begin_stopping(service, timeout_ms, true, "service_stop"); |
| 2485 | runtime_service_interrupt_connections(service); |
| 2486 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2487 | } |
| 2488 | |
| 2489 | bool cbm_daemon_runtime_service_free(cbm_daemon_runtime_service_t *service) { |
| 2490 | if (!service || |