Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Oct 2011 14:26:45 +0000 (UTC)
From:      Adrian Chadd <adrian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225980 - head/usr.bin/csup
Message-ID:  <201110041426.p94EQj7t061502@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: adrian
Date: Tue Oct  4 14:26:45 2011
New Revision: 225980
URL: http://svn.freebsd.org/changeset/base/225980

Log:
  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

Modified:
  head/usr.bin/csup/fixups.c

Modified: head/usr.bin/csup/fixups.c
==============================================================================
--- head/usr.bin/csup/fixups.c	Tue Oct  4 14:25:10 2011	(r225979)
+++ head/usr.bin/csup/fixups.c	Tue Oct  4 14:26:45 2011	(r225980)
@@ -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);
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201110041426.p94EQj7t061502>