| 7843 | } |
| 7844 | continue; |
| 7845 | } |
| 7846 | rc = dist_discard_bytes(fd, bytes); |
| 7847 | if (rc <= 0) { |
| 7848 | loop_rc = rc == 0 ? 0 : 1; |
| 7849 | break; |
| 7850 | } |
| 7851 | pthread_mutex_lock(&upstream.write_mu); |
| 7852 | dist_send_error(fd, "unsupported distributed worker frame"); |
| 7853 | pthread_mutex_unlock(&upstream.write_mu); |
| 7854 | fprintf(stderr, "ds4: distributed worker: rejected unsupported frame type %u\n", type); |
| 7855 | loop_rc = 1; |
| 7856 | break; |
| 7857 | } |
| 7858 | |
| 7859 | if (loop_rc == 0) dist_worker_job_queue_finish(&queue); |
| 7860 | else dist_worker_job_queue_cancel(&queue); |
| 7861 | pthread_join(eval_tid, NULL); |
| 7862 | if (loop_rc == 0 && queue.rc != 0) loop_rc = 1; |
| 7863 | dist_worker_job_queue_destroy(&queue); |
| 7864 | dist_worker_upstream_destroy(&upstream); |
| 7865 | return loop_rc; |
| 7866 | } |
| 7867 | |
| 7868 | static void *dist_worker_data_client_main(void *arg) { |
| 7869 | ds4_dist_data_client_ctx *ctx = arg; |
| 7870 | ds4_dist_worker_state *state = ctx->state; |
nothing calls this directly
no test coverage detected