| 1257 | } |
| 1258 | |
| 1259 | static bool runtime_worker_handle_unsubscribe(cbm_daemon_runtime_worker_t *worker, |
| 1260 | const uint8_t *payload, uint32_t length) { |
| 1261 | if (!runtime_worker_service_running(worker) || !payload || length != UNSUBSCRIBE_REQUEST_SIZE) { |
| 1262 | return false; |
| 1263 | } |
| 1264 | cbm_daemon_subscription_id_t subscription_id = runtime_get_u64(payload); |
| 1265 | bool removed = cbm_daemon_job_unsubscribe(worker->service->coordinator, worker->client_id, |
| 1266 | subscription_id); |
| 1267 | return runtime_worker_send_status(worker, CBM_DAEMON_RUNTIME_OP_JOB_UNSUBSCRIBE, removed); |
| 1268 | } |
| 1269 | |
| 1270 | static void *runtime_application_worker(void *opaque) { |
| 1271 | cbm_daemon_runtime_worker_t *worker = opaque; |
no test coverage detected