From: Andre Date: Tue, 9 May 2006 17:25:12 +0000 (+0200) Subject: check barriers also in afs_send_chunk() X-Git-Tag: v0.2.12~4 X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=commitdiff_plain;h=04ed0875fb66972083d3fbec44b734791e1cd12a 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. --- 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) {