| 2685 | } |
| 2686 | |
| 2687 | bool cbm_daemon_runtime_service_stop(cbm_daemon_runtime_service_t *service, uint32_t timeout_ms) { |
| 2688 | if (!service) { |
| 2689 | return false; |
| 2690 | } |
| 2691 | if (cbm_daemon_runtime_service_state(service) == CBM_DAEMON_RUNTIME_SERVICE_EXITED) { |
| 2692 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2693 | } |
| 2694 | runtime_service_begin_stopping(service, timeout_ms, true, "service_stop"); |
| 2695 | runtime_service_interrupt_connections(service); |
| 2696 | return cbm_daemon_runtime_service_wait_exited(service, timeout_ms); |
| 2697 | } |
| 2698 | |
| 2699 | bool cbm_daemon_runtime_service_free(cbm_daemon_runtime_service_t *service) { |
| 2700 | if (!service || |