| 1016 | } |
| 1017 | |
| 1018 | static bool runtime_worker_send_frame(cbm_daemon_runtime_worker_t *worker, |
| 1019 | cbm_daemon_frame_type_t type, |
| 1020 | cbm_daemon_runtime_operation_t operation, const void *payload, |
| 1021 | uint32_t length) { |
| 1022 | if (!worker) { |
| 1023 | return false; |
| 1024 | } |
| 1025 | cbm_mutex_lock(&worker->send_mutex); |
| 1026 | bool sent = |
| 1027 | worker->connection && |
| 1028 | cbm_daemon_ipc_send_frame(worker->connection, type, (uint16_t)operation, payload, length); |
| 1029 | cbm_mutex_unlock(&worker->send_mutex); |
| 1030 | return sent; |
| 1031 | } |
| 1032 | |
| 1033 | static bool runtime_worker_send_status(cbm_daemon_runtime_worker_t *worker, |
| 1034 | cbm_daemon_runtime_operation_t operation, bool success) { |
no test coverage detected