| 230 | } |
| 231 | |
| 232 | static void callback_batch_run(cbm_daemon_coordinator_t *coordinator, |
| 233 | cbm_daemon_callback_batch_t *batch) { |
| 234 | cbm_daemon_job_t *job = batch->jobs; |
| 235 | while (job) { |
| 236 | cbm_daemon_job_t *next = job->action_next; |
| 237 | batch->cancel_job(job->project_key, batch->context); |
| 238 | |
| 239 | cbm_mutex_lock(&coordinator->mutex); |
| 240 | coordinator->callback_count--; |
| 241 | job->cancel_callback_inflight = false; |
| 242 | bool detached = job->detached; |
| 243 | cbm_mutex_unlock(&coordinator->mutex); |
| 244 | if (detached) { |
| 245 | free_job(job); |
| 246 | } |
| 247 | job = next; |
| 248 | } |
| 249 | |
| 250 | cbm_daemon_watch_t *watch = batch->watches; |
| 251 | while (watch) { |
| 252 | cbm_daemon_watch_t *next = watch->action_next; |
| 253 | if (batch->release_watch) { |
| 254 | batch->release_watch(watch->project_key, batch->context); |
| 255 | cbm_mutex_lock(&coordinator->mutex); |
| 256 | coordinator->callback_count--; |
| 257 | cbm_mutex_unlock(&coordinator->mutex); |
| 258 | } |
| 259 | free_watch(watch); |
| 260 | watch = next; |
| 261 | } |
| 262 | } |
| 263 | |
| 264 | static void release_client_resources_locked(cbm_daemon_coordinator_t *coordinator, |
| 265 | cbm_daemon_client_id_t client_id, |
no test coverage detected