diff options
author | adrian <adrian@FreeBSD.org> | 2011-10-04 14:26:45 +0000 |
---|---|---|
committer | adrian <adrian@FreeBSD.org> | 2011-10-04 14:26:45 +0000 |
commit | b7672d6f5ec484e1580a003f39104c7b3d38b74c (patch) | |
tree | b4c8bb7621373e33d8c53f198d2116453176125d | |
parent | 069abf93c2a4ea0b586910723be6bf11cebe442e (diff) | |
download | FreeBSD-src-b7672d6f5ec484e1580a003f39104c7b3d38b74c.zip FreeBSD-src-b7672d6f5ec484e1580a003f39104c7b3d38b74c.tar.gz |
Handle the situation where fixups_close() has been called but more fixups
are still available on the queue.
Without this, the fixups producer/consumer pipeline will artifically terminate
before all of the fixups have been processed, leading to incomplete updates
and generally quite unhappy users.
Submitted by: mux
-rw-r--r-- | usr.bin/csup/fixups.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.bin/csup/fixups.c b/usr.bin/csup/fixups.c index b105a8f..a83ad1c 100644 --- a/usr.bin/csup/fixups.c +++ b/usr.bin/csup/fixups.c @@ -141,7 +141,7 @@ fixups_get(struct fixups *f) fixups_lock(f); while (f->size == 0 && !f->closed) pthread_cond_wait(&f->cond, &f->lock); - if (f->closed) { + if (f->closed && f->size == 0) { fixups_unlock(f); return (NULL); } |