| 2831 | } |
| 2832 | |
| 2833 | bool cbm_daemon_runtime_service_stop(cbm_daemon_runtime_service_t *service, uint32_t timeout_ms) { |
| 2834 | if (!service) { |
| 2835 | return false; |
| 2836 | } |
| 2837 | if (cbm_daemon_runtime_service_state(service) == CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 2838 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2839 | } |
| 2840 | runtime_service_begin_stopping(service, timeout_ms, true, "service_stop"); |
| 2841 | runtime_service_interrupt_connections(service); |
| 2842 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2843 | } |
| 2844 | |
| 2845 | bool cbm_daemon_runtime_service_free(cbm_daemon_runtime_service_t *service) { |
| 2846 | if (!service || |