From 04ed0875fb66972083d3fbec44b734791e1cd12a Mon Sep 17 00:00:00 2001 From: Andre Date: Tue, 9 May 2006 19:25:12 +0200 Subject: [PATCH] check barriers also in afs_send_chunk() As this function is called even if the select timeout didn't expire, we'll have to check the eof_barrier and the data_send barrier also early in afs_send_chunk() and return if there's time left. --- afs.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/afs.c b/afs.c index 0f4cd20e..6cc58bb4 100644 --- a/afs.c +++ b/afs.c @@ -452,6 +452,11 @@ void afs_send_chunk(void) afs_next_chunk_time(&due); if (tv_diff(&due, &now, NULL) > 0) return; + if (chk_barrier("eof", &now, &eof_barrier, &due, 1) < 0) + return; + if (chk_barrier("data send", &now, &data_send_barrier, + &due, 1) < 0) + return; buf = af->read_chunk(mmd->current_chunk, &ret); mmd->new_afs_status_flags &= ~AFS_REPOS; if (!buf) { -- 2.39.5