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